[MLton] cvs commit: MAIL: PosixError.SysCall changes

Matthew Fluet fluet@cs.cornell.edu
Sun, 2 May 2004 11:36:19 -0400 (EDT)


> > Posix.Process.pause
> > 	Why is there a FIXME comment?
>
> I wanted to raise a question as to the correct behavior of
> Posix.Process.pause.  Before this checkin, the code looked like:
>   fun pause () = Error.checkResult (Prim.pause ())
> Note that this would _always_ raise SysError, because pause is supposed to
> return -1 with errno set to EINTR.  Under the new code, we raise an error
> if errno is anything but EINTR.  This seems to be better behavior to me.

Along these same lines, I changed the semantics of Posix.FileSys.access.
Previously, we returned false if the underlying system call returned ~1.
Now, we return false if the system call returns ~1 and the errno
corresponds to an access failure; we raise a SysError if the errno
corresponds to another type of failure (invalid mode (although that should
be impossible in the SML type system), I/O error, insufficient kernel
memory).