home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 4021 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.7 KB

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