You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2005/11/28 16:54:53 UTC

svn commit: r349408 - /apr/apr/trunk/threadproc/unix/procsup.c

Author: jorton
Date: Mon Nov 28 07:54:49 2005
New Revision: 349408

URL: http://svn.apache.org/viewcvs?rev=349408&view=rev
Log:
* threadproc/unix/procsup.c (apr_proc_detach): Check chdir() return
value (fixes gcc warning with modern glibc and -D_FORTIFY_SOURCE=2).

Modified:
    apr/apr/trunk/threadproc/unix/procsup.c

Modified: apr/apr/trunk/threadproc/unix/procsup.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/threadproc/unix/procsup.c?rev=349408&r1=349407&r2=349408&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/unix/procsup.c (original)
+++ apr/apr/trunk/threadproc/unix/procsup.c Mon Nov 28 07:54:49 2005
@@ -20,7 +20,10 @@
 {
     int x;
 
-    chdir("/");
+    if (chdir("/") == -1) {
+        return errno;
+    }
+
 #if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS)
     /* Don't detach for MPE because child processes can't survive the death of
      * the parent. */