Tjark Weber wrote:
I'm a bit puzzled by the behavior of Posix.Process.alarm. As far as I understand its specification, calling it with a timeout of 0 should cancel any pending alarm request (and not raise an alarm itself).
The Standard ML Basis Library book doesn't say anything about treating Posix.Process.alarm Time.zeroTime differently from any other time so by implication it ought to send an alarm signal immediately. The Posix documentation, though, says that alarm(0) cancels any pending alarm and the FreeBSD man page explicitly says that this does not send a SIGALRM. I would assume that this is the intended behaviour and I've fixed this in CVS for version 5.
David.