projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3e01bd
)
daemon: report error if daemon child process fails to start properly
author
Ben Pfaff
<blp@nicira.com>
Fri, 9 Jan 2009 01:00:06 +0000
(17:00 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 13 Jan 2009 01:00:28 +0000
(17:00 -0800)
Found by Chris Eagle via Fortify.
lib/daemon.c
patch
|
blob
|
history
diff --git
a/lib/daemon.c
b/lib/daemon.c
index 3f417d420ddae5e257658157080754ff74774ff4..4d7b044b0f2e913c4a1eb20fa2020ac7d2043011 100644
(file)
--- a/
lib/daemon.c
+++ b/
lib/daemon.c
@@
-214,7
+214,9
@@
daemonize(void)
/* Parent process: wait for child to create pidfile, then exit. */
close(fds[1]);
fatal_signal_fork();
- read(fds[0], &c, 1);
+ if (read(fds[0], &c, 1) != 1) {
+ ofp_fatal(errno, "daemon child failed to signal startup");
+ }
exit(0);
case 0: