[MLton] bug in MLton and bug in basis
Thu, 18 Aug 2005 15:49:50 +0200
* Wesley W. Terpstra:
> Next, whoever wrote the standard clearly did not understand what
> Ctl.getERROR should do. It should return an OS.SysErr option, not
> a bool! That system call tells you WHAT the last error was, not if there
> was an error on the last operation (which you can infer if the last
> error had a value of 0).
Is this some ML-specific feature? Usually, successful calls do not
set the errno variable.
> The most common use of this system call is to determine the return
> code from a previous non-blocking connect.
You need some hackery to get this right because Solaris behaves
differently from most systems. IIRC, Stevens provides a portable (in
the practical sense) snippet of code in UNIX Network Programming.