[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Signal handling
From: |
Ben Pfaff |
Subject: |
Re: Signal handling |
Date: |
Wed, 12 Jan 2005 16:40:39 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
John Darrington <address@hidden> writes:
> In March last, you made this change to main.c shortly after I had
> added the bug_handler function:
Changelog says this:
Wed Mar 3 09:30:09 2004 Ben Pfaff <address@hidden>
* main.c: (main) sigaction()'s sa_flags member was uninitialized.
Just use signal() instead.
If you use sigaction, initialize all the members. It has three,
see the GNU libc manual:
- Data Type: struct sigaction
Structures of type `struct sigaction' are used in the `sigaction'
function to specify all the information about how to handle a
particular signal. This structure contains at least the following
members:
`sighandler_t sa_handler'
This is used in the same way as the ACTION argument to the
`signal' function. The value can be `SIG_DFL', `SIG_IGN', or
a function pointer. *Note Basic Signal Handling::.
`sigset_t sa_mask'
This specifies a set of signals to be blocked while the
handler runs. Blocking is explained in *Note Blocking for
Handler::. Note that the signal that was delivered is
automatically blocked by default before its handler is
started; this is true regardless of the value in `sa_mask'.
If you want that signal not to be blocked within its handler,
you must write code in the handler to unblock it.
`int sa_flags'
This specifies various flags which can affect the behavior of
the signal. These are described in more detail in *Note
Flags for Sigaction::.
I don't think I had any other objection.
--
"...I've forgotten where I was going with this,
but you can bet it was scathing."
--DesiredUsername