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

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!chinacat!rpp386!jfh
  2. From: jfh@rpp386.lonestar.org (John F. Haugh II)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Signals propagated from child to parent
  5. Message-ID: <21219@rpp386.lonestar.org>
  6. Date: 31 Jul 92 13:10:38 GMT
  7. References: <92352@bu.edu>
  8. Reply-To: jfh@rpp386.cactus.org (John F. Haugh II)
  9. Organization: River Parishes Programming, Austin, Republic of Texas
  10. Lines: 36
  11.  
  12. In article <92352@bu.edu> tasos@cs.bu.edu (Anastasios Kotsikonas) writes:
  13. >Well, can somebody clarify the following: when a forked child receives
  14. >a signal is the parent supposed to get the same signal (SIGSEGV for example)?
  15.  
  16. No.  Only the process that caused the SIGSEGV (or whatever) should receive
  17. the signal.
  18.  
  19. >If a A forks B, B forks C, C dies, B receives SIGCLD, is A supposed to get
  20. >SIGCLD too?
  21.  
  22. No.  Only the parent of the dead child receives the signal.
  23.  
  24. >If A forks B, A does a system(), is A supposed to receive SIGCLD? Well on AIX
  25. >not only it does, but the subsequent wait(), that we are supposed to execute
  26. >when catching SIGCLD, blocks for ever waiting for B to die!!!!!!!!
  27.  
  28. No.  The system() call should do the wait() for you and SIGCLD shouldn't
  29. be issued so that the system() call will get control after the process exits.
  30.  
  31. I don't know why YOU are doing a wait() since system() should have done the
  32. wait() already.
  33.  
  34. >If A forks B and B exits normally (exit (0)) is A supposed to be told
  35. >after the SIGCLD and wait() that WIFSIGNALED is TRUE AND WTERMSIG == SIGHUP?
  36.  
  37. No.  WIFSIGNALED should be FALSE.
  38.  
  39. >If the answers to all of the above are NO, then can somebody explain to me
  40. >why this f* AIX 3.1.7 and earlier behaves so differently than all other UNIXes?
  41.  
  42. Are you saying that all of those behaviors are being seen in AIX 3.1.7?
  43. -- 
  44. John F. Haugh II                   | Life's Little Instruction Book:
  45. Ma Bell: (512) 251-2151            | "#138.  Learn Spanish.  In a few years,
  46. UUCP: ...!cs.utexas.edu!rpp386!jfh |  more than 35% of all Americans will speak
  47. Domain: jfh@rpp386.cactus.org      |  it as their first language."
  48.