From 4d8a5ea64abb65ed086efc3e32125c529068acbe Mon Sep 17 00:00:00 2001 From: Mikael Hallendal 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