apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r349408 - /apr/apr/trunk/threadproc/unix/procsup.c
Date Mon, 28 Nov 2005 15:54:53 GMT
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. */



Mime
View raw message