apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r541660 - /apr/apr/branches/1.2.x/threadproc/unix/proc.c
Date Fri, 25 May 2007 14:09:29 GMT
Author: jorton
Date: Fri May 25 07:09:28 2007
New Revision: 541660

URL: http://svn.apache.org/viewvc?view=rev&rev=541660
Log:
Merge r239687 from trunk:

* threadproc/unix/proc.c (apr_proc_create): Use _exit() not exit() to
prevent atexit-registered functions from being run in a failing child,
and e.g. flushing stdio buffers.

PR: 30913
Reviewed by: jorton

Modified:
    apr/apr/branches/1.2.x/threadproc/unix/proc.c

Modified: apr/apr/branches/1.2.x/threadproc/unix/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/threadproc/unix/proc.c?view=diff&rev=541660&r1=541659&r2=541660
==============================================================================
--- apr/apr/branches/1.2.x/threadproc/unix/proc.c (original)
+++ apr/apr/branches/1.2.x/threadproc/unix/proc.c Fri May 25 07:09:28 2007
@@ -427,7 +427,7 @@
                 if (attr->errfn) {
                     attr->errfn(pool, errno, "change of working directory failed");
                 }
-                exit(-1);   /* We have big problems, the child should exit. */
+                _exit(-1);   /* We have big problems, the child should exit. */
             }
         }
 
@@ -437,7 +437,7 @@
                 if (attr->errfn) {
                     attr->errfn(pool, errno, "setting of group failed");
                 }
-                exit(-1);   /* We have big problems, the child should exit. */
+                _exit(-1);   /* We have big problems, the child should exit. */
             }
         }
 
@@ -446,7 +446,7 @@
                 if (attr->errfn) {
                     attr->errfn(pool, errno, "setting of user failed");
                 }
-                exit(-1);   /* We have big problems, the child should exit. */
+                _exit(-1);   /* We have big problems, the child should exit. */
             }
         }
 
@@ -454,7 +454,7 @@
             if (attr->errfn) {
                 attr->errfn(pool, errno, "setting of resource limits failed");
             }
-            exit(-1);   /* We have big problems, the child should exit. */
+            _exit(-1);   /* We have big problems, the child should exit. */
         }
 
         if (attr->cmdtype == APR_SHELLCMD ||
@@ -546,8 +546,8 @@
             attr->errfn(pool, errno, desc);
         }
 
-        exit(-1);  /* if we get here, there is a problem, so exit with an
-                    * error code. */
+        _exit(-1);  /* if we get here, there is a problem, so exit with an
+                     * error code. */
     }
 
     /* Parent process */



Mime
View raw message