Need help spawning a child

stripes at wam.UMD.EDU stripes at wam.UMD.EDU
Wed Jun 28 02:34:45 AEST 1989


In article <12244 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:
[stuff deleted]
>>Also, does anyone know what will happen to my sleeping process after
>>the signal handling call? Will it go back to sleep, or continue as if
>>it were given the alarm signal? What would be the effect of having
>>the signal handler send the alarm signal to the process?
>
>If a call to sleep() is interrupted by a signal for which a signal
>handler has been established, then the sleep() will resume where it
>left off after the signal handler exits.  I am fairly sure this will
>happen on all architectures; I just tested it on BSD, so I know it
>will happen there.
According to Bach's "The Design of the Unix Operating System", SysV
calls that are interupted by a signal return an error, this is true
under Ultrix as well where it returns EINTER, or someting like that.
For sleep() it looks like a good idea, but for everything else even
Mr. (or is it Dr?) Bach seems to admit that BSD's restart-syscall-after-
catching-signal is nicer.
In this case a simple "for(;;) sleep()" would do, even 'tho I prefer
to use a label and a goto just to answer a Kernal Kludge with a User Kludge.
>Jonathan Kamens			              USnail:
>MIT Project Athena				432 S. Rose Blvd.
>jik at Athena.MIT.EDU				Akron, OH  44320
>Office: 617-253-4261			      Home: 216-869-6432
-- 
           stripes at wam.umd.edu          "Security for Unix is like
      Josh_Osborne at Real_World,The          Mutitasking for MS-DOS"
      "The dyslexic porgramer"                  - Kevin Lockwood
		  Looking for a termcap entry for a PC running APL*PLUS...



More information about the Comp.unix.questions mailing list