alien_process: if (my_kill((IsWin95() ? -pid : pid), sig)) return 0; } } #### static int terminate_process(DWORD pid, HANDLE process_handle, int sig) { switch(sig) { case 0: /* "Does process exist?" use of kill */ return 1; case 2: if (GenerateConsoleCtrlEvent(CTRL_C_EVENT, pid)) return 1; break; case SIGBREAK: case SIGTERM: if (GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, pid)) return 1; break; default: /* For now be backwards compatible with perl 5.6 */ case 9: /* Note that we will only be able to kill processes owned by the * current process owner, even when we are running as an administrator. * To kill processes of other owners we would need to set the * 'SeDebugPrivilege' privilege before obtaining the process handle. */ if (TerminateProcess(process_handle, sig)) return 1; break; } return 0; }