Silence chdir by catching return value
authorMikael Hallendal <micke@imendio.com>
Wed, 19 Nov 2008 10:16:40 +0100
changeset 567 0cb53b009e8c
parent 566 ac126834c160
child 572 0a4fa0952ef6
Silence chdir by catching return value
loudmouth/asyncns.c
--- a/loudmouth/asyncns.c	Wed Nov 19 10:12:27 2008 +0100
+++ b/loudmouth/asyncns.c	Wed Nov 19 10:16:40 2008 +0100
@@ -382,6 +382,7 @@
     int have_death_sig = 0;
     assert(in_fd > 2);
     assert(out_fd > 2);
+    int no_warn;
     
     close(0);
     close(1);
@@ -391,7 +392,7 @@
     open("/dev/null", O_WRONLY);
     open("/dev/null", O_WRONLY);
 
-    chdir("/");
+    no_warn = chdir("/");
 
     if (geteuid() == 0) {
         struct passwd *pw;