diff options
author | njl <njl@FreeBSD.org> | 2005-10-24 18:34:54 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-10-24 18:34:54 +0000 |
commit | 427aeb138a2da952e06d76ea02ef8513a91e73b6 (patch) | |
tree | 3c59b44d2dbbddb1dd25e309cb6319e0c9b83515 | |
parent | 801034beff674521ca90e0920559094fb822ddb6 (diff) | |
download | FreeBSD-src-427aeb138a2da952e06d76ea02ef8513a91e73b6.zip FreeBSD-src-427aeb138a2da952e06d76ea02ef8513a91e73b6.tar.gz |
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>
-rw-r--r-- | usr.sbin/powerd/powerd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 10230a0..11b912f 100644 --- a/usr.sbin/powerd/powerd.c +++ b/usr.sbin/powerd/powerd.c @@ -488,9 +488,6 @@ main(int argc, char * argv[]) signal(SIGTERM, handle_sigs); 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. */ if (!vflag) { pid_t otherpid; @@ -512,6 +509,9 @@ main(int argc, char * argv[]) pidfile_write(pfh); } + /* Decide whether to use ACPI or APM to read the AC line status. */ + acline_init(); + /* Main loop. */ for (;;) { /* Check status every few milliseconds. */ |