X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fworker.c;h=4c947a422aa057751139c1e6130e0005145ca128;hb=4816a18f33380a33d381b77d41df39113c94500d;hp=ce4a53b26051505d5e995b335c7cbee87e72adef;hpb=780325b5b8d4c0552b4b7719e0a38200d99f6b08;p=sliver-openvswitch.git diff --git a/lib/worker.c b/lib/worker.c index ce4a53b26..4c947a422 100644 --- a/lib/worker.c +++ b/lib/worker.c @@ -101,6 +101,9 @@ worker_start(void) xset_nonblocking(work_fds[0]); xset_nonblocking(work_fds[1]); + /* Don't let the worker process own the responsibility to delete + * the pidfile. Register it again after the fork. */ + remove_pidfile_from_unlink(); if (!fork_and_clean_up()) { /* In child (worker) process. */ daemonize_post_detach(); @@ -110,6 +113,7 @@ worker_start(void) } /* In parent (main) process. */ + add_pidfile_to_unlink(); close(work_fds[1]); client_sock = work_fds[0]; rxbuf_init(&client_rx);