in reply to System call + signals = bad return code?
If you want to trap signals, it's better to do this yourself For example, fork/exec the child and have the parent call waitpid. If the waitpid is interrupted by the alarm, have the parent explicitly kill the child. An alternative is not to use alarm at all, but just to call waitpid about once a second. When the time is up just kill the child process. Update: Clarified a little
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: System call + signals = bad return code?
by swkronenfeld (Hermit) on Sep 28, 2007 at 22:30 UTC | |
by bluto (Curate) on Sep 28, 2007 at 23:00 UTC |