[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenwatchdogd: Fix build errors



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275891403 -3600
# Node ID 9c98ae6e23b2baf1a335563189e9fd45c68aec89
# Parent  7ec2a241eda8390fb53c1a5e02f18b1218d5f37d
xenwatchdogd: Fix build errors

Signed-off-by: Patrick Colp <pjcolp@xxxxxxxxx>
---
 tools/misc/xenwatchdogd.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r 7ec2a241eda8 -r 9c98ae6e23b2 tools/misc/xenwatchdogd.c
--- a/tools/misc/xenwatchdogd.c Mon Jun 07 07:14:19 2010 +0100
+++ b/tools/misc/xenwatchdogd.c Mon Jun 07 07:16:43 2010 +0100
@@ -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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.