Time bug work around

Stephen Weeks MLton@sourcelight.com
Sun, 15 Jul 2001 21:01:22 -0700


> Note, I have seen different bugs on 2.2 and 2.4 kernels.  Given that we don't
> return any of the other fields from MLton.Rusage.rusage, why not just use
> times().  I know that I recommended against it before because it is old
> fashioned, but it IS atomic so I would just use that.  It is trivial to
> change the C code and leave the structure MLton.Rusage the same as it is.
> Isn't this clearly the way to go?

I think MLton.Rusage.get should call getrusage and Posix.ProcEnv.times should
call times.  That's better than misleading people as to what's called, even with
bugs.  I am beginning to think that maybe the best thing to do is to leave the C
code and basis library alone, and just put a patch in control.sml, and document
the getrusage bug in the manaul.  After all, we expect the getrusage bug to be
fixed at some point.  And people can work around it themselves by calling
Posix.ProcEnv.times or with some other fix if they want.