apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/threadproc/win32 signals.c
Date Thu, 20 Sep 2001 20:25:11 GMT
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;
   }
  
  
  

Mime
View raw message