home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!munnari.oz.au!metro!usage!spectrum!cameron
- From: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson)
- Subject: Re: timing problem with $SIG{'CHLD'}
- Message-ID: <1992Dec15.062547.4902@usage.csd.unsw.OZ.AU>
- Sender: news@usage.csd.unsw.OZ.AU
- Nntp-Posting-Host: fuligin.spectrum.cs.unsw.oz.au
- Reply-To: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson)
- Organization: CS&E Computing Facility, Uni Of NSW, Oz
- References: <1992Dec9.102933.27264@hemlock.cray.com> <9=h2hs#@rpi.edu> <9234910.11586@mulga.cs.mu.OZ.AU>
- Date: Tue, 15 Dec 1992 06:25:47 GMT
- Lines: 34
-
- nobled@rebecca.its.rpi.edu (David Noble) writes:
- | until ($addr = accept(NS,S))
- | { die $! unless $! eq 'Interrupted system call'; }
- |
- | Of course, this breaks if the text of the error message varies for
- | different platforms. In that case, you would have to check for any
- | variants on the interrupted system call message. Anybody know offhand
- | whether the text of $! is defined by perl or the operating system?
-
- ggr@nareen.acci.COM.AU (Greg Rose) writes:
- | My understanding is that the text of the error message comes from
- | somthing that (eg. IBM) vendors often change, but the *NUMBER*
- | associated with the error is defined by POSIX. So I always use
- |
- | sub EINTR { 4; }
- |
- | until ($addr = accept(NS,S)) {
- | die $! unless $! == &EINTR;
- | }
-
- Better still,
-
- require 'errno.ph';
-
- until ($addr = accept(NS,S)) {
- die $! unless $! == &EINTR;
- }
-
- since the name should be even stabler.
- - Cameron Simpson
- cameron@cs.unsw.oz.au, DoD 0743
- --
- "The engine purrs beneath me with a purpose,
- ready for the pleasure of my hand upon the throttle." - Peter Smith
-