summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2007-05-25 14:09:28 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2007-05-25 14:09:28 +0000
commit6421d8ead8a84123a826def3aa7715c5a1c0acd3 (patch)
tree10896379136c32c244837d40e5edeba6dfafa921
parent9701fb221f5f25d4808fec785fb65deb801e3da4 (diff)
downloadlibapr-6421d8ead8a84123a826def3aa7715c5a1c0acd3.tar.gz
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 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@541660 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--threadproc/unix/proc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index 0f3437aee..bf743527c 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -427,7 +427,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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 */