home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7397 < prev    next >
Encoding:
Text File  |  1992-12-13  |  1.3 KB  |  34 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!nareen.acci.COM.AU!ggr
  3. From: ggr@nareen.acci.COM.AU (Greg Rose)
  4. Subject: Re: timing problem with $SIG{'CHLD'}
  5. Message-ID: <9234910.11586@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Australian Computing and Communications Institute
  8. References: <1992Dec9.102933.27264@hemlock.cray.com> <9=h2hs#@rpi.edu>
  9. Date: Sun, 13 Dec 1992 23:56:32 GMT
  10. Lines: 22
  11.  
  12. In article <9=h2hs#@rpi.edu> nobled@rebecca.its.rpi.edu (David Noble) writes:
  13. >    until ($addr = accept(NS,S))
  14. >    { die $! unless $! eq 'Interrupted system call'; }
  15. >
  16. >Of course, this breaks if the text of the error message varies for
  17. >different platforms. In that case, you would have to check for any
  18. >variants on the interrupted system call message. Anybody know offhand
  19. >whether the text of $! is defined by perl or the operating system?
  20.  
  21. My understanding is that the text of the error message comes from
  22. somthing that (eg. IBM) vendors often change, but the *NUMBER*
  23. associated with the error is defined by POSIX. So I always use
  24.  
  25. sub EINTR { 4; }
  26.  
  27. until ($addr = accept(NS,S)) {
  28.     die $! unless $! == &EINTR;
  29. }
  30. --
  31. Greg Rose                 Australian Computing and Communications Institute
  32. ggr@acci.com.au                                              +61 18 174 842
  33. `Use of the standard phrase "HIJACKED" may be inadvisable' -- CAA
  34.