Date: Wed, 13 Jun 2001 10:19:51 +0300 (EEST) From: netch@netch.kiev.ua (Valentin Nechayev) To: FreeBSD-gnats-submit@freebsd.org Subject: bin/28116: init: allow reboot during runcom Message-ID: <200106130719.f5D7Jpr00636@iv.nn.kiev.ua>
next in thread | raw e-mail | index | archive | help
>Number: 28116 >Category: bin >Synopsis: init: allow reboot during runcom >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jun 13 00:30:11 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Valentin Nechayev >Release: FreeBSD 4.3-STABLE i386 >Organization: private >Environment: FreeBSD 4.3-STABLE i386 >Description: /sbin/init does not react on Ctrl-Alt-Del in "runcom" state (during running /etc/rc). If boot process hangs (even some fresh FreeBSD ports caused hanging due to bugs in startup scripts), there often is no possibility to interrupt it correctly (without reset button). >How-To-Repeat: >Fix: In runcom(), init does not check for transitions requested from signal handlers before /etc/rc finished. Modify it to check for `death'. Patch to RELENG_4 (but also applicable cleanly to HEAD): --- /usr/src/sbin/init/init.c.orig Sat May 26 21:48:37 2001 +++ /usr/src/sbin/init/init.c Wed Jun 13 09:44:00 2001 @@ -798,10 +798,13 @@ /* * Copied from single_user(). This is a bit paranoid. */ + requested_transition = 0; do { if ((wpid = waitpid(-1, &status, WUNTRACED)) != -1) collect_child(wpid); if (wpid == -1) { + if (requested_transition == death) + return death; if (errno == EINTR) continue; warning("wait for %s on %s failed: %m; going to single user mode", >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106130719.f5D7Jpr00636>