On Tuesday 21 October 2008 03:34:21 pm Chris Craig wrote:
> Actually the problem turned out to be that I had enabled
> CONFIG_DEBUG_INIT, bypassing all the signal handling. Would it be
> helpful to have a message indicating that signals will be ignored if
> this is enabled?
D O H
It must not be a CONFIG_xxx option at all then!
--
vda
diff -d -urpN busybox.2/init/Config.in busybox.3/init/Config.in
--- busybox.2/init/Config.in 2008-10-17 16:23:11.000000000 +0200
+++ busybox.3/init/Config.in 2008-10-21 18:48:02.000000000 +0200
@@ -12,14 +12,6 @@ config INIT
help
init is the first program run when the system boots.
-config DEBUG_INIT
- bool "Debugging aid"
- default n
- depends on INIT
- help
- Turn this on to disable all the dangerous
- rebooting stuff when debugging.
-
config FEATURE_USE_INITTAB
bool "Support reading an inittab file"
default y
diff -d -urpN busybox.2/init/init.c busybox.3/init/init.c
--- busybox.2/init/init.c 2008-10-17 16:23:11.000000000 +0200
+++ busybox.3/init/init.c 2008-10-21 18:50:13.000000000 +0200
@@ -14,6 +14,10 @@
#include <paths.h>
#include <sys/reboot.h>
+/* Was a CONFIG_xxx option. A lot of people were building
+ * not fully functional init by switching it on! */
+#define DEBUG_INIT 0
+
#define COMMAND_SIZE 256
#define CONSOLE_NAME_SIZE 32
#define MAXENV 16 /* Number of env. vars */
@@ -103,7 +107,7 @@ static void loop_forever(void)
* "where" may be bitwise-or'd from L_LOG | L_CONSOLE
* NB: careful, we can be called after vfork!
*/
-#define messageD(...) do { if (ENABLE_DEBUG_INIT) message(__VA_ARGS__); } while (0)
+#define messageD(...) do { if (DEBUG_INIT) message(__VA_ARGS__); } while (0)
static void message(int where, const char *fmt, ...)
__attribute__ ((format(printf, 2, 3)));
static void message(int where, const char *fmt, ...)
@@ -275,7 +279,7 @@ static void open_stdio_to_tty(const char
tty_name, strerror(errno));
if (exit_on_failure)
_exit(EXIT_FAILURE);
- if (ENABLE_DEBUG_INIT)
+ if (DEBUG_INIT)
_exit(2);
/* NB: we don't reach this if we were called after vfork.
* Thus halt_reboot_pwoff() itself need not be vfork-safe. */
@@ -788,7 +792,7 @@ int init_main(int argc UNUSED_PARAM, cha
return kill(1, SIGHUP);
}
- if (!ENABLE_DEBUG_INIT) {
+ if (!DEBUG_INIT) {
/* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
if (getpid() != 1
&& (!ENABLE_FEATURE_INITRD || !strstr(applet_name, "linuxrc"))
diff -d -urpN busybox.2/scripts/defconfig busybox.3/scripts/defconfig
--- busybox.2/scripts/defconfig 2008-10-17 16:22:59.000000000 +0200
+++ busybox.3/scripts/defconfig 2008-10-21 18:47:50.000000000 +0200
@@ -367,7 +367,6 @@ CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
# Init Utilities
#
CONFIG_INIT=y
-# CONFIG_DEBUG_INIT is not set
CONFIG_FEATURE_USE_INITTAB=y
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
diff -d -urpN busybox.2/TODO_config_nommu busybox.3/TODO_config_nommu
--- busybox.2/TODO_config_nommu 2008-10-17 16:23:12.000000000 +0200
+++ busybox.3/TODO_config_nommu 2008-10-21 18:47:46.000000000 +0200
@@ -369,7 +369,6 @@ CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
# Init Utilities
#
CONFIG_INIT=y
-# CONFIG_DEBUG_INIT is not set
CONFIG_FEATURE_USE_INITTAB=y
CONFIG_FEATURE_KILL_REMOVED=y
CONFIG_FEATURE_KILL_DELAY=1
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox