diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-10-15 07:11:03 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-10-15 07:11:03 +0000 |
commit | e2f89031c7d8036ed93386b26fb751e34a9d225f (patch) | |
tree | ff6957769117f8f17ee18d3dc8bf095e389f7017 | |
parent | 0eb79fb1ef6565077988898a390c4aa269bfe0ea (diff) |
freebsd uses SIGINT to request a reboot, we may as well be consistent.
pointed out by kettenis@ and deraadt@
-rw-r--r-- | sbin/init/init.8 | 8 | ||||
-rw-r--r-- | sbin/init/init.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sbin/init/init.8 b/sbin/init/init.8 index 4decc2abb05..a6db624e0f4 100644 --- a/sbin/init/init.8 +++ b/sbin/init/init.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: init.8,v 1.43 2010/10/14 23:48:57 dlg Exp $ +.\" $OpenBSD: init.8,v 1.44 2010/10/15 07:11:02 dlg Exp $ .\" $NetBSD: init.8,v 1.6 1995/03/18 14:56:31 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -33,7 +33,7 @@ .\" .\" @(#)init.8 8.6 (Berkeley) 5/26/95 .\" -.Dd $Mdocdate: October 14 2010 $ +.Dd $Mdocdate: October 15 2010 $ .Dt INIT 8 .Os .Sh NAME @@ -220,14 +220,14 @@ if a user-defined signal 1 user-defined signal 2 .Pq Dv USR2 , or -.Dv QUIT +.Dv INT signal is received. Following this, .Dv USR1 will halt the system; .Dv USR2 will request a powerdown; and -.Dv QUIT +.Dv INT will cause a reboot. .Pa /etc/rc.shutdown can specify that a powerdown is requested instead of the action diff --git a/sbin/init/init.c b/sbin/init/init.c index 2b76f934ace..8a22ba66aca 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.44 2010/10/14 23:48:57 dlg Exp $ */ +/* $OpenBSD: init.c,v 1.45 2010/10/15 07:11:02 dlg Exp $ */ /* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- @@ -232,12 +232,12 @@ main(int argc, char *argv[]) handle(badsys, SIGSYS, 0); handle(disaster, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGXCPU, SIGXFSZ, 0); - handle(transition_handler, SIGHUP, SIGQUIT, SIGTERM, SIGTSTP, + handle(transition_handler, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGUSR1, SIGUSR2, 0); handle(alrm_handler, SIGALRM, 0); sigfillset(&mask); delset(&mask, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGSYS, - SIGXCPU, SIGXFSZ, SIGHUP, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2, + SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGTSTP, SIGALRM, 0); sigprocmask(SIG_SETMASK, &mask, NULL); memset(&sa, 0, sizeof sa); @@ -1134,7 +1134,7 @@ transition_handler(int sig) case SIGHUP: requested_transition = clean_ttys; break; - case SIGQUIT: + case SIGINT: requested_transition = do_reboot; break; case SIGTERM: |