03-12-2006
1,
0
Join Date: Mar 2006
Last Activity: 12 March 2006, 3:35 AM EST
Posts: 1
Thanks Given: 0
Thanked 0 Times in 0 Posts
gnu history library signal segfault [solved]
i am trying to use the history functions in a c++ program along with a custom signal handler for SIGINT.
the prog works fine catching signals without the line:
add_history(*args);
but as soon as this line is added, the prog segfaults on SIGINT.
does anyone have experience using gnu history with custom signal handlers?
[solved]
the add_history function did not work well with the *args pointer.. it would complile and execute once fine, but segfault.. fixed by assigning *args contents to buffer var and passing this in to add_history.
Last edited by a1g0rithm; 03-12-2006 at 04:35 AM..