X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fworker.c;h=4c947a422aa057751139c1e6130e0005145ca128;hb=add037c6b692db9c66dd0c16dff2d4b1b46c7499;hp=6ca05cdbec04aba04017734b7522bff1b442b543;hpb=d1673b006d53fdea72c0744e835362ed1917f879;p=sliver-openvswitch.git diff --git a/lib/worker.c b/lib/worker.c index 6ca05cdbe..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); @@ -345,7 +349,7 @@ worker_reply_iovec(const struct iovec *iovs, size_t n_iovs, * to avoid missing log messages. */ VLOG_INFO("send failed (%s)", strerror(error)); } else if (error) { - VLOG_ABORT("send failed (%s)", strerror(error)); + VLOG_FATAL("send failed (%s)", strerror(error)); } free(all_iovs); @@ -379,7 +383,7 @@ worker_main(int fd) /* Main process closed the IPC socket. Exit cleanly. */ break; } else if (error != EAGAIN) { - VLOG_ABORT("RPC receive failed (%s)", strerror(error)); + VLOG_FATAL("RPC receive failed (%s)", ovs_retval_to_string(error)); } poll_fd_wait(server_sock, POLLIN);