fork and sleep
Posted: Tue May 10, 2005 11:09 pm
Can someone explain to me why the following code does not sleep 5 seconds?
I have a hunch that a signal from the forked child invalidates the sleep - but I have no proof.
Gord
I have a hunch that a signal from the forked child invalidates the sleep - but I have no proof.
Code: Select all
(define (SleepMe x)
(println "Starting...")
(fork (dotimes (y 10) (println y)))
(sleep (* x 1000))
(println "Why do you not sleep?")
)
(SleepMe 50)