home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!warwick!dcs.warwick.ac.uk!sunserver1.aston.ac.uk!uhura!evansmp
- From: evansmp@uhura.aston.ac.uk (Mark Evans)
- Newsgroups: comp.unix.programmer
- Subject: Re: Signals propagated from child to parent
- Message-ID: <1992Jul30.174135.26084@aston.ac.uk>
- Date: 30 Jul 92 17:41:35 GMT
- References: <92352@bu.edu>
- Sender: usenet@aston.ac.uk (Usenet administrator)
- Organization: Aston University
- Lines: 29
- Nntp-Posting-Host: uhura
-
- tasos@cs.bu.edu (Anastasios Kotsikonas) writes:
- : Greetings to all. Subject should have been "AIX bashing".
- :
- : Well, can somebody clarify the following: when a forked child receives
- : a signal is the parent supposed to get the same signal (SIGSEGV for example)?
- :
- : If a A forks B, B forks C, C dies, B receives SIGCLD, is A supposed to get
- : SIGCLD too?
- Not unless B then exits.
-
- :
- : If A forks B, A does a system(), is A supposed to receive SIGCLD? Well on AIX
- : not only it does, but the subsequent wait(), that we are supposed to execute
- : when catching SIGCLD, blocks for ever waiting for B to die!!!!!!!!
- system () will call wait() internaly and will return after waiting for the
- shell.
- The wait you put in can only be for B.
-
- :
- : If A forks B and B exits normally (exit (0)) is A supposed to be told
- : after the SIGCLD and wait() that WIFSIGNALED is TRUE AND WTERMSIG == SIGHUP?
- In that case wait() will give you the the exit status of the child,
- in this case 0.
- (that's why status is defined as a union)
- --
- -------------------------------------------------------------------------
- Mark Evans |evansmp@uhura.aston.ac.uk
- +(44) 21 565 1979 (Home) |evansmp@cs.aston.ac.uk
- +(44) 21 359 6531 x4039 (Office) |
-