Re: Should parent's WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread John Z. Bohach
On Saturday 22 September 2007 16:35:56 Andreas Schwab wrote: > "John Z. Bohach" <[EMAIL PROTECTED]> writes: > > if (WIFEXITED(siginfo->si_status)) > > That does not make any sense. si_status is _not_ a wait status. > > Andreas. Thank you for clearing that up. That explains it. --john - To

Re: Should parent's WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread Andreas Schwab
"John Z. Bohach" <[EMAIL PROTECTED]> writes: > if (WIFEXITED(siginfo->si_status)) That does not make any sense. si_status is _not_ a wait status. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key

Re: Should parent's WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread John Z. Bohach
On Saturday 22 September 2007 11:49:09 Michael Kerrisk wrote: > John, > ...snip... > > If the child terminated by calling exit(), regardless of whether it > was done from inside a signal handler, then WIFEXITED() should test > true, but WIFSIGNALED() will not. If you are seeing otherwise, then

Re: Should parent's WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread Nicholas Miell
On Sat, 2007-09-22 at 11:22 -0700, John Z. Bohach wrote: > Hello, > > It is unclear from the various documentions in the kernel and glibc what > the proper behaviour should be for the case when a child process > catches a SIGNAL (say for instance, SIGTERM), and then calls exit() > from within

Re: Should parent's WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread Michael Kerrisk
John, > It is unclear from the various documentions in the kernel and glibc what > the proper behaviour should be for the case when a child process > catches a SIGNAL (say for instance, SIGTERM), and then calls exit() > from within its caught SIGNAL handler. > > Since the exit() will cause a

Should parent's WIFSIGNALED(siginfo->si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread John Z. Bohach
Hello, It is unclear from the various documentions in the kernel and glibc what the proper behaviour should be for the case when a child process catches a SIGNAL (say for instance, SIGTERM), and then calls exit() from within its caught SIGNAL handler. Since the exit() will cause a SIGCHLD to

Should parent's WIFSIGNALED(siginfo-si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread John Z. Bohach
Hello, It is unclear from the various documentions in the kernel and glibc what the proper behaviour should be for the case when a child process catches a SIGNAL (say for instance, SIGTERM), and then calls exit() from within its caught SIGNAL handler. Since the exit() will cause a SIGCHLD to

Re: Should parent's WIFSIGNALED(siginfo-si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread Michael Kerrisk
John, It is unclear from the various documentions in the kernel and glibc what the proper behaviour should be for the case when a child process catches a SIGNAL (say for instance, SIGTERM), and then calls exit() from within its caught SIGNAL handler. Since the exit() will cause a SIGCHLD to

Re: Should parent's WIFSIGNALED(siginfo-si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread Nicholas Miell
On Sat, 2007-09-22 at 11:22 -0700, John Z. Bohach wrote: Hello, It is unclear from the various documentions in the kernel and glibc what the proper behaviour should be for the case when a child process catches a SIGNAL (say for instance, SIGTERM), and then calls exit() from within its

Re: Should parent's WIFSIGNALED(siginfo-si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread John Z. Bohach
On Saturday 22 September 2007 11:49:09 Michael Kerrisk wrote: John, ...snip... If the child terminated by calling exit(), regardless of whether it was done from inside a signal handler, then WIFEXITED() should test true, but WIFSIGNALED() will not. If you are seeing otherwise, then show

Re: Should parent's WIFSIGNALED(siginfo-si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread Andreas Schwab
John Z. Bohach [EMAIL PROTECTED] writes: if (WIFEXITED(siginfo-si_status)) That does not make any sense. si_status is _not_ a wait status. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint =

Re: Should parent's WIFSIGNALED(siginfo-si_status) be true EVEN IF the SIGNAL was caught by the child?

2007-09-22 Thread John Z. Bohach
On Saturday 22 September 2007 16:35:56 Andreas Schwab wrote: John Z. Bohach [EMAIL PROTECTED] writes: if (WIFEXITED(siginfo-si_status)) That does not make any sense. si_status is _not_ a wait status. Andreas. Thank you for clearing that up. That explains it. --john - To unsubscribe