summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/reboot/reboot.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 528c45c06e7..a44fff77871 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reboot.c,v 1.13 1998/08/05 07:37:37 deraadt Exp $ */
+/* $OpenBSD: reboot.c,v 1.14 1998/08/07 20:17:32 deraadt Exp $ */
/* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: reboot.c,v 1.13 1998/08/05 07:37:37 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: reboot.c,v 1.14 1998/08/07 20:17:32 deraadt Exp $";
#endif
#endif /* not lint */
@@ -195,30 +195,14 @@ main(argc, argv)
/*
* After the processes receive the signal, start the rest of the
- * buffers on their way.
+ * buffers on their way. Wait 5 seconds between the SIGTERM and
+ * the SIGKILL to give everybody a chance.
*/
sleep(2);
if (!nflag)
sync();
+ sleep(3);
- /*
- * Wait for up to 12 seconds for processes that need a long
- * time to shut down (e.g., X servers on old slow notebook PCs with
- * only 8 MB of RAM and a slow disk; or databases), but probe at
- * 1 second intervals and continue immediately if none are left.
- */
- for (i=0; i<12; ++i) {
- if (kill(-1, 0) == -1) {
- if (errno == ESRCH)
- break;
- goto restart;
- }
- sleep(1);
- }
-
- /*
- * They've had their chance. SIGKILL the remaining processes.
- */
for (i = 1;; ++i) {
if (kill(-1, SIGKILL) == -1) {
if (errno == ESRCH)