Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!purdue!decwrl!shlump.dec.com!decuac!jetson!john From: john@jetson.UPMA.MD.US (John Owens) Newsgroups: comp.bugs.sys5 Subject: Re: What's a system call ( Was: 'what' doesn't use perror...) Message-ID: <225@jetson.UPMA.MD.US> Date: 18 May 89 00:55:32 GMT References: <3759@sugar.hackercorp.com] <10156@smoke.BRL.MIL] <1232@netcom.UUCP> Organization: SMART HOUSE Limited Partnership Lines: 18 In article <1232@netcom.UUCP>, chris@netcom.UUCP (Chris Lakewood) writes: > ] alarm(n); > ] pause(); > ](the guts of sleep) and what happens if the process doesn't run for n > Don't leave us in suspense... What happens if the process doesn't run for > n seconds? Actually, the process won't run for at least n seconds unless > it receives some signal. The pause causes the process to block until a > signal is received. If the process doesn't run for 'n' seconds *after* the alarm() is posted and *before* pause() is called, it'll get a SIGALRM (which is, I think, set to SIG_IGN at that point), not do anything, then call pause() too late.... -- John Owens john@jetson.UPMA.MD.US uunet!jetson!john +1 301 249 6000 john%jetson.uucp@uunet.uu.net