mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
sig.c: disable kernel default ctrl-alt-delete handler
This fixes a long-standanding issue with finit not controlling the reboot when the user presses ctrl-alt-delete (PC systems). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -521,7 +521,11 @@ void sig_setup(uev_ctx_t *ctx)
|
||||
erase(SYNC_SHUTDOWN);
|
||||
erase(SYNC_STOPPED);
|
||||
|
||||
/* Standard SysV init calls ctrl-alt-delete handler */
|
||||
/*
|
||||
* Standard SysV init calls ctrl-alt-delete handler
|
||||
* We need to disable kernel default so it sends us SIGINT
|
||||
*/
|
||||
reboot(RB_DISABLE_CAD);
|
||||
uev_signal_init(ctx, &sigint_watcher, sigint_cb, NULL, SIGINT);
|
||||
|
||||
/* BusyBox/SysV init style signals for halt, power-off and reboot. */
|
||||
|
||||
Reference in New Issue
Block a user