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
RAISE_DEFAULT_SIGNAL(3) 				   BSD Library Functions Manual 				   RAISE_DEFAULT_SIGNAL(3)

NAME
raise_default_signal -- raise the default signal handler LIBRARY
System Utilities Library (libutil, -lutil) SYNOPSIS
#include <util.h> int raise_default_signal(int sig); DESCRIPTION
The raise_default_signal() function raises the default signal handler for the signal sig. This function may be used by a user-defined signal handler router to ensure that a parent process receives the correct notification of a process termination by a signal. This can be used to avoid a common programming mistake when terminating a process from a custom SIGINT or SIGQUIT signal handler. The operations performed are: 1. Block all signals, using sigprocmask(2). 2. Set the signal handler for signal sig to the default signal handler (SIG_DFL). 3. raise(3) signal sig. 4. Unblock signal sig to deliver it. 5. Restore the original signal mask and handler, even if there was a failure. See signal(7) for a table of signals and default actions. The raise_default_signal() function should be async-signal-safe. RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global variable errno is set to indicate the error. ERRORS
The raise_default_signal() function may fail and set errno for any of the errors specified for the functions sigemptyset(3), sigfillset(3), sigaddset(3), sigprocmask(2), sigaction(2), or raise(3). SEE ALSO
sigaction(2), sigprocmask(2), raise(3), signal(7) HISTORY
The raise_default_signal() function first appeared in NetBSD 5.0. BSD
September 25, 2007 BSD
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy