Subject: Re: Sane exit from a program on receipt of a signal
To: None <>
From: ITOH Yasufumi <>
List: tech-userlevel
Date: 07/20/2007 12:03:27
mouse@Rodents.Montreal.QC.CA writes:
> > You're probably right; the code could just be simplified to call the
> > sig*() functions and not bother checking the return values (except
> > for possibly sigaction()); the function is intended to terminate the
> > process.
> It is?  I thought it was intended to invoke the default action for the
> signal, which may not be to terminate the process (the most plausible
> example that comes to mind is SIGTSTP).

As for SIGTSTP and other tty signals, the signal should be sent
to the process group rather than to just the current process.

If the function is for easy way to exit program, it should not return.

I don't think we can make a generic function for different purposes.
ITOH Yasufumi