Skip to content

Commit

Permalink
Don't call Pervasives.exit to let async clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenth committed Feb 5, 2015
1 parent 032e647 commit 66d264e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lib_test/async/helper.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ let socket_path =
sprintf "%s/_build/helper_async.socket" (Std_unix.getcwd ())

let handle_sigterm _ =
let ctrl_t =
Log.info logger "got sigterm, exiting";
Unix.unlink socket_path in
don't_wait_for ctrl_t;
Pervasives.exit 0
Log.info logger "got sigterm, exiting";
don't_wait_for (exit 0)

let control_handler fd =
let handler req =
Expand Down
2 changes: 1 addition & 1 deletion lib_test/async/slave.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let logger = Logger.syslog

let handle_sigterm _ =
Log.info logger "got sigterm";
Pervasives.exit 0
don't_wait_for (exit 0)

let ipc_lock = Sequencer.create ()

Expand Down

0 comments on commit 66d264e

Please sign in to comment.