I agree that it does seem to only happen on Linux. There's code doing waiting at line 303 of
https://github.com/HOL-Theorem-Prover/HOL/blob/master/tools/Holmake/poly/ProcessMultiplexor.sml In the Poly sources, the fromStatus function is also called in doWait (a few lines further down in basis/Posix.sml) The HOL code does also call fromStatus, but after the call to waitpid_nh. As it happens, the status codes are coming from poly/ml executables being called via fork/exec. Could I just catch the Fail exn, and make the status a W_EXITSTATUS (Word8.fromInt 255)? (Not that I think the child poly should be failing...) Michael > On 25 Apr 2016, at 21:40, David Matthews <[email protected]> > wrote: > > Searching for Fail in the Posix code shows one situation where it could be > raised. Posix.Process.fromStatus converts a value of type OS.Process.status > into a value of type exit_status. exit_status is defined as > datatype exit_status = > W_EXITED > | W_EXITSTATUS of Word8.word > | W_SIGNALED of signal > | W_STOPPED of signal > > The breaking out of the OS.Process.status is done in the run-time system > using the WIFEXITED, WIFSIGNALED and WIFSTOPPED macros. If none of these > applies then the Fail exception will be raised. > > I've run some tests on Debian Linux and it looks as though the value of 255 > fails to match any of these. That doesn't seem to happen on Mac OS. That > raises the question of where this value is coming from and how it should be > treated. Does this seem to fit with your code? Are you using > Posix.Process.fromStatus and where is the value coming from? > > David > > On 21/04/2016 12:34, Michael Norrish wrote: >> As can be seen in >> >> https://travis-ci.org/HOL-Theorem-Prover/HOL/jobs/124717527 >> >> our use of Posix waiting is occasionally causing a Fail exception to be >> raised from inside the Posix implementation (there's no Fail exception with >> that message in our source code, and our code *is* doing a wait at that >> point). >> >> I'm afraid this doesn't seem easy to reproduce. >> >> Michael >> >> >> ________________________________ >> >> The information in this e-mail may be confidential and subject to legal >> professional privilege and/or copyright. National ICT Australia Limited >> accepts no liability for any damage caused by this email or its attachments. >> _______________________________________________ >> polyml mailing list >> [email protected] >> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml >> _______________________________________________ polyml mailing list [email protected] http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
