diff options
Diffstat (limited to 'sbin/devd/devd.cc')
-rw-r--r-- | sbin/devd/devd.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 2fa9132..288e90a 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -596,6 +596,7 @@ event_loop(void) if (Dflag) fprintf(stderr, "Calling daemon\n"); daemon(0, 0); + cfg.drop_pidfile(); once++; } } @@ -743,9 +744,10 @@ main(int argc, char **argv) } cfg.parse(); - if (!dflag && nflag) + if (!dflag && nflag) { daemon(0, 0); - cfg.drop_pidfile(); + cfg.drop_pidfile(); + } signal(SIGHUP, gensighand); signal(SIGINT, gensighand); signal(SIGTERM, gensighand); |