summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2003-01-14 18:35:39 +0000
committerbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2003-01-14 18:35:39 +0000
commit26beeba7d9030657b44ce6dc0bdb985b298ed9ab (patch)
tree612b03b1a56b8dbcd6fb4112b8aca83f3367071a /threadproc
parent834cd58ba92a43857b003ee66e0a53c06a98a00b (diff)
downloadlibapr-26beeba7d9030657b44ce6dc0bdb985b298ed9ab.tar.gz
Always load the NLM detached so that we don't have to wait for it to clean
up when it terminates. Also check for the correct return value for procve() git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/netware/proc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c
index 782e05bbd..4ca612d64 100644
--- a/threadproc/netware/proc.c
+++ b/threadproc/netware/proc.c
@@ -301,7 +301,10 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
newproc->out = attr->parent_out;
newproc->err = attr->parent_err;
- addr_space = (attr->detached ? 0 : PROC_CURRENT_SPACE) | PROC_LOAD_SILENT;
+ /* attr->detached and PROC_DETACHED do not mean the same thing. attr->detached means
+ * start the NLM in a separate address space. PROC_DETACHED means don't wait for the
+ * NLM to unload by calling wait() or waitpid(), just clean up */
+ addr_space = (attr->detached ? 0 : PROC_CURRENT_SPACE) | PROC_LOAD_SILENT | PROC_DETACHED;
if (attr->currdir) {
char *fullpath = NULL;
@@ -315,7 +318,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
}
if ((newproc->pid = procve(progname, addr_space, (const char**)env, &wire,
- NULL, NULL, 0, NULL, (const char **)args)) == 0) {
+ NULL, NULL, 0, NULL, (const char **)args)) == -1) {
return errno;
}