home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 13260 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  1.9 KB

  1. Xref: sparky comp.unix.questions:13260 comp.unix.programmer:5253
  2. Newsgroups: comp.unix.questions,comp.unix.programmer
  3. Path: sparky!uunet!panther!panther3.panther.mot.com!ronf
  4. From: ronf@panther3.panther.mot.com (Ron Feigen)
  5. Subject: Re: Reliable signals in Unix ?
  6. Message-ID: <1992Nov11.203017.6717@panther.mot.com>
  7. Keywords: signal
  8. Sender: usenet@panther.mot.com
  9. Nntp-Posting-Host: panther3.panther.mot.com
  10. Organization: Motorola Panther Project, Chandler, AZ
  11. References: <1992Nov11.163624.10937@lambda.msfc.nasa.gov>
  12. Date: Wed, 11 Nov 1992 20:30:17 GMT
  13. Lines: 41
  14.  
  15. In article <1992Nov11.163624.10937@lambda.msfc.nasa.gov> bday@lambda.msfc.nasa.gov (Brian Day) writes:
  16. >OK, time for a question from the brain-dead.
  17. >
  18. >I have two Unix processes: one sends a burst of signals to the
  19. >other.  The receiving process misses several of these signals -
  20. >i.e.  they don't get 'queued up'.
  21. >
  22. >I know I could set up a kluge with a semaphore to act as an up-down
  23. >counter, but I was hoping for a more elegant solution.  This is
  24. >on a Sparcstation 4 running SunOS 4.1.1.
  25. >
  26. >Any suggestions ?
  27. >
  28. >Many thanks,
  29. >
  30. >bd
  31. >
  32. >
  33. >-- 
  34. >Brian Day                                       bday@lambda.msfc.nasa.gov
  35. >New Technology, Inc.                            (205) 461-4584
  36. >Mission Operations Support Systems              Opinions are my own -
  37. >Marshall Space Flight Center, Huntspatch, AL    May be fatal if swallowed
  38.  
  39. Signals will not queue up.  Reliable delivery means that they will be delivered
  40. but once delievered the signal maybe ignored, as in the case of _burts_ of the
  41. same type of signal.
  42.  
  43. What I have done in the past with SIG_CHLD is after servicing a SIG_CHLD (wait3)
  44. I will _loop_ on wait3() assuming there might have been other SIG_CHLDs I missed
  45. while processing the first SIG_CHLD if I get an ECHILD I exit.
  46.  
  47. You might try a pipe and use SIGIO.  You can then read from the pipe until it is
  48. empty.
  49.  
  50.  
  51. -- 
  52.  
  53. >
  54. Ron Feigen
  55. ronf@panther.mot.com
  56.