(main): Don't ignore result of chdir call.
authorUlrich Drepper <drepper@redhat.com>
Tue, 19 Jul 2005 15:30:46 +0000 (15:30 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 19 Jul 2005 15:30:46 +0000 (15:30 +0000)
nscd/nscd.c

index 7dd9cb7..a7aa964 100644 (file)
@@ -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);