home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!cs.utexas.edu!chinacat!rpp386!jfh
- From: jfh@rpp386.lonestar.org (John F. Haugh II)
- Newsgroups: comp.unix.programmer
- Subject: Re: Signals propagated from child to parent
- Message-ID: <21219@rpp386.lonestar.org>
- Date: 31 Jul 92 13:10:38 GMT
- References: <92352@bu.edu>
- Reply-To: jfh@rpp386.cactus.org (John F. Haugh II)
- Organization: River Parishes Programming, Austin, Republic of Texas
- Lines: 36
-
- In article <92352@bu.edu> tasos@cs.bu.edu (Anastasios Kotsikonas) writes:
- >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)?
-
- No. Only the process that caused the SIGSEGV (or whatever) should receive
- the signal.
-
- >If a A forks B, B forks C, C dies, B receives SIGCLD, is A supposed to get
- >SIGCLD too?
-
- No. Only the parent of the dead child receives the signal.
-
- >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!!!!!!!!
-
- No. The system() call should do the wait() for you and SIGCLD shouldn't
- be issued so that the system() call will get control after the process exits.
-
- I don't know why YOU are doing a wait() since system() should have done the
- wait() already.
-
- >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?
-
- No. WIFSIGNALED should be FALSE.
-
- >If the answers to all of the above are NO, then can somebody explain to me
- >why this f* AIX 3.1.7 and earlier behaves so differently than all other UNIXes?
-
- Are you saying that all of those behaviors are being seen in AIX 3.1.7?
- --
- John F. Haugh II | Life's Little Instruction Book:
- Ma Bell: (512) 251-2151 | "#138. Learn Spanish. In a few years,
- UUCP: ...!cs.utexas.edu!rpp386!jfh | more than 35% of all Americans will speak
- Domain: jfh@rpp386.cactus.org | it as their first language."
-