List Info

Thread: Re: Sane exit from a program on receipt of a signal




Re: Sane exit from a program on receipt of a signal
user name
2007-07-19 22:03:27
mouseRodents.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

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )