aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc/xenwatchdogd.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-07 07:16:43 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-07 07:16:43 +0100
commit16c22751fa88229cb961cdf6bbc7c4d228b50ee9 (patch)
tree85c85385718975bfad54bc694b7fa0e556c865eb /tools/misc/xenwatchdogd.c
parentcbc6cc9ee3819a690934d4bf0f2bd5ad1ad438a0 (diff)
downloadxen-16c22751fa88229cb961cdf6bbc7c4d228b50ee9.tar.gz
xen-16c22751fa88229cb961cdf6bbc7c4d228b50ee9.tar.bz2
xen-16c22751fa88229cb961cdf6bbc7c4d228b50ee9.zip
xenwatchdogd: Fix build errors
Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca>
Diffstat (limited to 'tools/misc/xenwatchdogd.c')
-rw-r--r--tools/misc/xenwatchdogd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c
index aa96834e5f..254117b554 100644
--- 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)