Create the devd thread after we have called daemon(). Otherwise, it would
be killed when the parent exits. Submitted by: Rudolf Cejka <cejkar / fit.vutbr.cz>
This commit is contained in:
parent
c395e805cd
commit
33a00fc0b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151628
@ -488,9 +488,6 @@ main(int argc, char * argv[])
|
|||||||
signal(SIGTERM, handle_sigs);
|
signal(SIGTERM, handle_sigs);
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
/* Decide whether to use ACPI or APM to read the AC line status. */
|
|
||||||
acline_init();
|
|
||||||
|
|
||||||
/* Run in the background unless in verbose mode. */
|
/* Run in the background unless in verbose mode. */
|
||||||
if (!vflag) {
|
if (!vflag) {
|
||||||
pid_t otherpid;
|
pid_t otherpid;
|
||||||
@ -512,6 +509,9 @@ main(int argc, char * argv[])
|
|||||||
pidfile_write(pfh);
|
pidfile_write(pfh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Decide whether to use ACPI or APM to read the AC line status. */
|
||||||
|
acline_init();
|
||||||
|
|
||||||
/* Main loop. */
|
/* Main loop. */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Check status every few milliseconds. */
|
/* Check status every few milliseconds. */
|
||||||
|
Loading…
Reference in New Issue
Block a user