[MLton] cvs commit: {OS,Posix}.Process.sleep

Henry Cejtin henry.cejtin@sbcglobal.net
Tue, 12 Jul 2005 16:38:25 -0500


Wasn't  the  conclusion  that  OS.Process.sleep  had  to  loop if nanosleep()
returned with time left?  (I hadn't noticed that Posix.Process.sleep returned
a  Time.time, but given that it does, looping would clearly be wrong for it.)

I see that the glibc source for sleep(), which does  not  keep  sleeping  for
most interrupts, DOES go through a song and dance to block SIGCHLD around the
call to nanosleep().  None the less, my tests seem to indicate  that  SIGCHLD
does  NOT  abort a nanosleep() (at least not if you aren't doing any thing to
handle it).