From be686f1876c5ebbf95801b270522066bfebb0905 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 19 Jul 2005 15:30:46 +0000 Subject: [PATCH] (main): Don't ignore result of chdir call. --- nscd/nscd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nscd/nscd.c b/nscd/nscd.c index 7dd9cb7722..a7aa964804 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -240,7 +240,9 @@ main (int argc, char **argv) setsid (); - chdir ("/"); + if (chdir ("/") != 0) + error (EXIT_FAILURE, errno, + _("cannot change current working cirectory to \"/\"")); openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);