Sponsored Content
Top Forums Programming gnu history library signal segfault Post 101716 by a1g0rithm on Sunday 12th of March 2006 03:13:20 AM
Old 03-12-2006
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..
 

3 More Discussions You Might Find Interesting

1. Linux

Installing GNU C library

I m working on a project of making a boot/root pendrive linux from source. I have got the basic working root filesystem with busybox. Now i wish to install GNU C library. But couldnt find a proper document to refer to. Also i tried the steps in LFS with just specifying the installation directory... (2 Replies)
Discussion started by: amu
2 Replies

2. Linux

Plz Help me to find GNU C++ Runtime Library

Hi, I am working with red hat Linux and i want to install one program but I am getting the error This product requires the GNU C++ Runtime Library (libstdc++-libc6.2-2.so.3) or later. Your system must be upgraded before installation can proceed. So please tell me how can i remove this... (2 Replies)
Discussion started by: smartgupta
2 Replies

3. Programming

GNU C library for parsing of XML files

Hi all, Is there a known GNU C library available for parsing XML files for particular attributes ? (1 Reply)
Discussion started by: vsanjit
1 Replies
stsignal(3)						    ShapeTools Toolkit Library						       stsignal(3)

NAME
stCatchSigs, stInterruptAction, stQuitAction, stTermAction, stCleanup, stExit - signal handling SYNOPSIS
#include <config.h> #include <sttk.h> void stCatchSigs (void); Sfunc_t(*stInterruptAction)(); Sfunc_t(*stQuitAction)(); Sfunc_t(*stTermAction)(); void stCleanup (void); void stExit (int exitCode); DESCRIPTION
stCatchSigs activates a number of interrupt handlers, defined internally in the ShapeTools toolkit library. Interrupt handlers are defined for the signals SIGINT, SIGQUIT, SIGFPE, SIGBUS, SIGSEGV, and SIGTERM. All interrupt handlers, except the one for SIGINT, cause program termination after having done some cleanup work. The cleanup consists of removing all temporary files by calling stRmRegisteredFiles(3). Some of the signal handlers are capable to execute functions defined by the application, while handling the interrupt. This mechanism is activated by assigning a functions address to the appropriate variable. The following is a complete List. Signal Variable SIGINT stInterruptAction SIGQUIT stQuitAction SIGTERM stTermAction stCleanup calls stRmRegisteredFiles(3) to remove all temporary files and the AtFS function af_cleanup(3) that orders AtFS's affairs. stExit does the same as stCleanup and additionally end the program execution returning exitCode. SEE ALSO
signal (3), stRmRegisteredFiles(3), af_cleanup(3). sttk-1.7 Thu Jun 24 17:43:32 1993 stsignal(3)
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy