WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenwatchdogd: Fix build errors
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 06 Jun 2010 23:55:21 -0700
Delivery-date: Sun, 06 Jun 2010 23:56:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenwatchdogd: Fix build errors, Xen patchbot-unstable <=