Skip to content

Commit

Permalink
consider exit-on-segv to be an exceptional exit status, per common un…
Browse files Browse the repository at this point in the history
…ix convention
  • Loading branch information
vtjnash committed Jul 17, 2015
1 parent 0ab5f86 commit 3c3f46d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void jl_find_stack_bottom(void)
// what to do on SIGINT
DLLEXPORT void jl_sigint_action(void)
{
if (exit_on_sigint) jl_exit(0);
if (exit_on_sigint) jl_exit(130); // 128+SIGINT
jl_throw(jl_interrupt_exception);
}

Expand Down Expand Up @@ -363,7 +363,7 @@ static BOOL WINAPI sigint_handler(DWORD wsig) //This needs winapi types to guara
}
else {
jl_signal_pending = 0;
if (exit_on_sigint) jl_exit(0);
if (exit_on_sigint) jl_exit(130);
if ((DWORD)-1 == SuspendThread(hMainThread)) {
//error
jl_safe_printf("error: SuspendThread failed\n");
Expand Down Expand Up @@ -770,7 +770,7 @@ void *mach_segv_listener(void *arg)
while (1) {
int ret = mach_msg_server(exc_server,2048,segv_port,MACH_MSG_TIMEOUT_NONE);
jl_safe_printf("mach_msg_server: %s\n", mach_error_string(ret));
jl_exit(1);
jl_exit(128+SIGSEGV);
}
}

Expand Down

0 comments on commit 3c3f46d

Please sign in to comment.