[MLton] interrupted system call

Stephen Weeks MLton@mlton.org
Wed, 24 Mar 2004 12:00:54 -0800


> If it is acceptable for system calls to block interrupts,

I don't know.  It certainly sounds like a simple programming model to
have system calls never interrupted by signals.  But maybe it rules
out some stuff.  There must be some reason for EINTR and ERESTART.

> then we could just solve things by replacing all system calls by
> first blocking interrupts, then doing the system call, and then
> unblocking them.  This would only turn single system calls into 3,
> but those extra system calls are almost certainly quite cheap.

Agreed.  Although I'd probably go the extra step of the code I just
sent to avoid the 2 extra calls in most cases.