projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbc6cc9
)
xenwatchdogd: Fix build errors
author
Keir Fraser
<keir.fraser@citrix.com>
Mon, 7 Jun 2010 06:16:43 +0000
(07:16 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Mon, 7 Jun 2010 06:16:43 +0000
(07:16 +0100)
Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca>
tools/misc/xenwatchdogd.c
patch
|
blob
|
history
diff --git
a/tools/misc/xenwatchdogd.c
b/tools/misc/xenwatchdogd.c
index aa96834e5fa40eb7e914464a1900d02be0be55d0..254117b554c59196cae120ab0a0505d15d5a704b 100644
(file)
--- a/
tools/misc/xenwatchdogd.c
+++ b/
tools/misc/xenwatchdogd.c
@@
-28,9
+28,12
@@
void daemonize(void)
err(1, "setsid");
if (chdir("/") < 0)
err(1, "chdir /");
- freopen("/dev/null", "r", stdin);
- freopen("/dev/null", "w", stdout);
- freopen("/dev/null", "w", stderr);
+ if (freopen("/dev/null", "r", stdin) == NULL)
+ err(1, "reopen stdin");
+ if(freopen("/dev/null", "w", stdout) == NULL)
+ err(1, "reopen stdout");
+ if(freopen("/dev/null", "w", stderr) == NULL)
+ err(1, "reopen stderr");
}
void catch_exit(int sig)