[MLton] interrupted system call
Henry Cejtin
henry@sourcelight.com
Mon, 22 Mar 2004 18:01:44 -0600
I don't know exactly what MLton does, but at the OS level, it depends on what
the sa_flags of the struct sigaction is set to. If you want system calls to
be restarted (after the signal handler is called) then you should set it to
SA_RESTART. If you don't then as I recall Linux is more system-V-ish, which
means that the system call fails with an errno as you see it.
The notion is that sometimes you want an interrupt to exit the system call,
and if you use SA_RESTART, then that won't happen, although you can use
setsetjmp and the like to get the effect (yuck).