mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
converts SIGQUIT into SIGABRT in the daemon
This commit is contained in:
parent
ddc298bd3d
commit
0a1c4d24c3
@ -509,10 +509,10 @@ _stop_exit(c3_i int_i)
|
||||
u3_daemon_bail();
|
||||
}
|
||||
|
||||
/* _stop_trace(): print trace on SIGABRT.
|
||||
/* _stop_signal(): handle termination signal.
|
||||
*/
|
||||
static void
|
||||
_stop_trace(c3_i int_i)
|
||||
_stop_signal(c3_i int_i)
|
||||
{
|
||||
// if we have a pier, unmap the event log before dumping core
|
||||
//
|
||||
@ -673,7 +673,7 @@ main(c3_i argc,
|
||||
|
||||
// Cleanup on SIGABRT.
|
||||
//
|
||||
signal(SIGABRT, _stop_trace);
|
||||
signal(SIGABRT, _stop_signal);
|
||||
|
||||
printf("~\n");
|
||||
// printf("welcome.\n");
|
||||
|
@ -750,6 +750,19 @@ _daemon_sign_init(void)
|
||||
sig_u->nex_u = u3_Host.sig_u;
|
||||
u3_Host.sig_u = sig_u;
|
||||
}
|
||||
|
||||
// handle SIGQUIT (turn it into SIGABRT)
|
||||
//
|
||||
{
|
||||
u3_usig* sig_u;
|
||||
|
||||
sig_u = c3_malloc(sizeof(u3_usig));
|
||||
uv_signal_init(u3L, &sig_u->sil_u);
|
||||
|
||||
sig_u->num_i = SIGQUIT;
|
||||
sig_u->nex_u = u3_Host.sig_u;
|
||||
u3_Host.sig_u = sig_u;
|
||||
}
|
||||
}
|
||||
|
||||
/* _daemon_sign_cb: signal callback.
|
||||
@ -778,6 +791,10 @@ _daemon_sign_cb(uv_signal_t* sil_u, c3_i num_i)
|
||||
u3_term_ef_winc();
|
||||
break;
|
||||
}
|
||||
|
||||
case SIGQUIT: {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user