You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/06/10 19:14:05 UTC
cvs commit: apache-2.0/src/lib/apr/threadproc/win32 proc.c
wrowe 00/06/10 10:14:05
Modified: src/lib/apr/threadproc/win32 proc.c
Log:
Decry the horrible state the completion of ap_proc_t has left some
platforms in... since pid is a process id (valid across all processes)
but the handle we stuff in this field is invalid outside the process
that created the handle.
Oh, and cast the cr*p to dump the compiler warning.
Revision Changes Path
1.31 +5 -1 apache-2.0/src/lib/apr/threadproc/win32/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/win32/proc.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- proc.c 2000/05/24 23:44:48 1.30
+++ proc.c 2000/06/10 17:14:05 1.31
@@ -348,7 +348,11 @@
if (CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, pEnvBlock, attr->currdir,
&attr->si, &pi)) {
- new->pid = pi.hProcess;
+ // TODO: THIS IS BADNESS
+ // The completion of the ap_proc_t type leaves us ill equiped to track both
+ // the pid (Process ID) and handle to the process, which are entirely
+ // different things and each useful in their own rights.
+ new->pid = (pid_t) pi.hProcess;
if (attr->child_in) {
ap_close(attr->child_in);