static const struct acpi_event f_evt_tab[] = {
{ "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRF 00000080" },
{ "EV_KEY", 0x01, "KEY_POWER", 116, 1, "button/power PWRB 00000080" },
+ { "EV_SW", 0x05, "SW_LID", 0x00, 1, "button/lid LID0 00000080" },
};
struct acpi_action {
const char *opt_action = "/etc/acpid.conf";
const char *opt_map = "/etc/acpi.map";
#if ENABLE_FEATURE_PIDFILE
- const char *opt_pidfile = "/var/run/acpid.pid";
+ const char *opt_pidfile = CONFIG_PID_FILE_PATH "/acpid.pid";
#endif
INIT_G();
xchdir(opt_dir);
+ /* We spawn children but don't wait for them. Prevent zombies: */
bb_signals((1 << SIGCHLD), SIG_IGN);
- bb_signals(BB_FATAL_SIGS, record_signo);
+ // If you enable this, (1) explain why, (2)
+ // make sure while(poll) loop below is still interruptible
+ // by SIGTERM et al:
+ //bb_signals(BB_FATAL_SIGS, record_signo);
pfd = NULL;
nfd = 0;
}
if (!event)
continue;
- // spawn event handler
+ /* spawn event handler */
process_event(event);
}
}