summaryrefslogtreecommitdiff
blob: 0ee8c940fade00fd31b2080d53ac44c3e425ba8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 4d8a5ea64abb65ed086efc3e32125c529068acbe Mon Sep 17 00:00:00 2001
From: Mikael Hallendal <micke@imendio.com>
Date: Wed, 19 Nov 2008 10:16:40 +0100
Subject: [PATCH] Silence chdir by catching return value

---
 loudmouth/asyncns.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/loudmouth/asyncns.c b/loudmouth/asyncns.c
index 9b238fa..55cb471 100644
--- a/loudmouth/asyncns.c
+++ b/loudmouth/asyncns.c
@@ -382,6 +382,7 @@ static int process_worker(int in_fd, int out_fd) {
     int have_death_sig = 0;
     assert(in_fd > 2);
     assert(out_fd > 2);
+    int no_warn;
     
     close(0);
     close(1);
@@ -391,7 +392,7 @@ static int process_worker(int in_fd, int out_fd) {
     open("/dev/null", O_WRONLY);
     open("/dev/null", O_WRONLY);
 
-    chdir("/");
+    no_warn = chdir("/");
 
     if (geteuid() == 0) {
         struct passwd *pw;
-- 
1.7.7.1