You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2001/09/20 22:25:11 UTC
cvs commit: apr/threadproc/win32 signals.c
wrowe 01/09/20 13:25:11
Modified: threadproc/win32 signals.c
Log:
No cast needed here, but some NULL checking would be nice.
Revision Changes Path
1.17 +6 -2 apr/threadproc/win32/signals.c
Index: signals.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/signals.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- signals.c 2001/09/09 06:03:05 1.16
+++ signals.c 2001/09/20 20:25:11 1.17
@@ -66,8 +66,12 @@
/* Windows only really support killing process, but that will do for now. */
APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signal)
{
- if (TerminateProcess((HANDLE)proc->hproc, signal) == 0) {
- return apr_get_os_error();
+ if (proc->hproc != NULL) {
+ if (TerminateProcess(proc->hproc, signal) == 0) {
+ return apr_get_os_error();
+ }
+ CloseHandle(proc->hproc);
+ proc->hproc = NULL;
}
return APR_SUCCESS;
}