projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stream: Add stream_run(), stream_run_wait() functions.
[openvswitch]
/
lib
/
daemon.c
diff --git
a/lib/daemon.c
b/lib/daemon.c
index c4effa9b0b91c425326b29e365a94febe0631da7..9a1be55dbfc868d14274a138e9bd28c1491dc521 100644
(file)
--- a/
lib/daemon.c
+++ b/
lib/daemon.c
@@
-25,6
+25,7
@@
#include "fatal-signal.h"
#include "dirs.h"
#include "lockfile.h"
#include "fatal-signal.h"
#include "dirs.h"
#include "lockfile.h"
+#include "socket-util.h"
#include "timeval.h"
#include "util.h"
#include "timeval.h"
#include "util.h"
@@
-280,9
+281,14
@@
void
daemonize_complete(void)
{
if (detach) {
daemonize_complete(void)
{
if (detach) {
- char c = 0;
+ size_t bytes_written;
+ int error;
+
+ error = write_fully(daemonize_fds[1], "", 1, &bytes_written);
+ if (error) {
+ ovs_fatal(error, "could not write to pipe");
+ }
- ignore(write(daemonize_fds[1], &c, 1));
close(daemonize_fds[1]);
setsid();
if (chdir_) {
close(daemonize_fds[1]);
setsid();
if (chdir_) {