* and only one will be remembered and acted upon.
*/
-/* The SIGUSR[12]/SIGTERM handler */
+/* The SIGPWR/SIGUSR[12]/SIGTERM handler */
static void halt_reboot_pwoff(int sig) NORETURN;
static void halt_reboot_pwoff(int sig)
{
/* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined,
* then parse_inittab() simply adds in some default
- * actions(i.e., INIT_SCRIPT and a pair
- * of "askfirst" shells */
+ * actions (i.e., INIT_SCRIPT and a pair
+ * of "askfirst" shells) */
parse_inittab();
}
struct sigaction sa;
bb_signals(0
+ + (1 << SIGPWR) /* halt */
+ (1 << SIGUSR1) /* halt */
+ (1 << SIGTERM) /* reboot */
+ (1 << SIGUSR2) /* poweroff */