Skip to content

Commit

Permalink
Change Posix.Process.exit to use the same underlying call as OS.Proce…
Browse files Browse the repository at this point in the history
…ss.terminate.

This avoids a hang in Test190.
  • Loading branch information
dcjm committed Feb 27, 2020
1 parent 744d14f commit 6025c25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions basis/Posix.sml
Original file line number Diff line number Diff line change
Expand Up @@ -848,9 +848,11 @@ struct

(* The definition of "exit" is obviously designed to allow
OS.Process.exit to be defined in terms of it. In particular
it doesn't execute the functions registered with atExit. *)
it doesn't execute the functions registered with atExit.
This should use Terminate rather than Finish so that C atExit routines
aren't executed either. *)
local
val doExit: Word8.word -> unit = RunCall.rtsCallFull1 "PolyFinish"
val doExit: Word8.word -> unit = RunCall.rtsCallFull1 "PolyTerminate"
in
fun exit w =
(
Expand Down

0 comments on commit 6025c25

Please sign in to comment.