diff options
author | Joe Orton <jorton@apache.org> | 2005-08-24 15:14:39 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2005-08-24 15:14:39 +0000 |
commit | 90dcde68ad49ff26a9f17c9580b33c48c16d4104 (patch) | |
tree | a7a85b6754a6ab951801bd3ed3fdeaaca67abdc9 /threadproc/unix/proc.c | |
parent | 9792205ea4116fbb3136244047ebb84d6a7b6649 (diff) | |
download | apr-90dcde68ad49ff26a9f17c9580b33c48c16d4104.tar.gz apr-90dcde68ad49ff26a9f17c9580b33c48c16d4104.zip |
* 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
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@239687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/unix/proc.c')
-rw-r--r-- | threadproc/unix/proc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c index ce32b09bf..5631e4c64 100644 --- a/threadproc/unix/proc.c +++ b/threadproc/unix/proc.c @@ -419,7 +419,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. */ } } @@ -429,7 +429,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. */ } } @@ -438,7 +438,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. */ } } @@ -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 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 || @@ -538,8 +538,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 */ |