summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authordreid <dreid@13f79535-47bb-0310-9956-ffa450edef68>1999-10-22 22:06:16 +0000
committerdreid <dreid@13f79535-47bb-0310-9956-ffa450edef68>1999-10-22 22:06:16 +0000
commitefdf5b87e9ac0d1a91efd2387d0e4b571159fa1b (patch)
tree3b9eed80ceda2e8107caf90aa24e79778e701b8b /threadproc
parent7bd4023b7b617834ce0f50c03601490d70da587f (diff)
downloadlibapr-efdf5b87e9ac0d1a91efd2387d0e4b571159fa1b.tar.gz
Fiz a small problem with the thread_id not being returned by correctly
by ap_get_os_proc. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59405 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/beos/apr_proc_stub.c4
-rw-r--r--threadproc/beos/proc.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/threadproc/beos/apr_proc_stub.c b/threadproc/beos/apr_proc_stub.c
index 346f1b520..9f0c1219f 100644
--- a/threadproc/beos/apr_proc_stub.c
+++ b/threadproc/beos/apr_proc_stub.c
@@ -32,7 +32,7 @@ int main(int argc, char *argv[]) {
size_t readbuf = 100;
readbuffer = (char*)malloc(sizeof(char) * readbuf);
- *newargs = (char*)malloc(sizeof(char) * (argc - 1));
+ newargs = (char**)malloc(sizeof(char*) * (argc - 1));
buffer = (void*)malloc(sizeof(struct pipefd));
/* this will block until we get the data */
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
if (directory != NULL)
chdir(directory);
- execve (progname, newargs, pfd->envp);
+ execve (progname, newargs, NULL);
return (-1);
} \ No newline at end of file
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index 61edc1a12..2a7c4a003 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -224,8 +224,7 @@ ap_status_t ap_create_process(struct proc_t **new, const char *progname,
}
resume_thread(newproc);
send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe));
-
- (*new)->pid = newproc;
+ (*new)->tid = newproc;
/* before we go charging on we need the new process to get to a
* certain point. When it gets there it'll let us know and we
@@ -328,7 +327,7 @@ ap_status_t ap_get_os_proc(ap_os_proc_t *theproc, ap_proc_t *proc)
if (proc == NULL) {
return APR_ENOPROC;
}
- theproc = &(proc->pid);
+ *theproc = proc->tid;
return APR_SUCCESS;
}
@@ -342,7 +341,7 @@ ap_status_t ap_put_os_proc(struct proc_t **proc, ap_os_proc_t *theproc,
(*proc) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t));
(*proc)->cntxt = cont;
}
- (*proc)->pid = *theproc;
+ (*proc)->tid = *theproc;
return APR_SUCCESS;
}