]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | /* |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.3 1997/09/02 14:26:37 mclareni | |
6 | * WINNT correction | |
7 | * | |
8 | * Revision 1.2 1997/02/04 17:34:24 mclareni | |
9 | * Merge Winnt and 97a versions | |
10 | * | |
11 | * Revision 1.1.1.1.2.1 1997/01/21 11:29:32 mclareni | |
12 | * All mods for Winnt 96a on winnt branch | |
13 | * | |
14 | * Revision 1.1.1.1 1996/02/15 17:49:24 mclareni | |
15 | * Kernlib | |
16 | * | |
17 | */ | |
18 | #ifdef WIN32 | |
19 | # include <windows.h> | |
20 | #endif | |
21 | ||
22 | #include "kerngen/pilot.h" | |
23 | #include "kerngen/fortranc.h" | |
24 | ||
25 | ||
26 | /*> ROUTINE KILLF (IPID,ISIG) | |
27 | CERN PROGLIB# Z265 KILLF .VERSION KERNFOR 4.26 910313 | |
28 | ORIG. 22/02/91, JZ | |
29 | Fortran interface routine to kill | |
30 | */ | |
31 | #if defined(CERNLIB_QX_SC) | |
32 | int type_of_call killf_(pid, sig) | |
33 | #endif | |
34 | #if defined(CERNLIB_QXNO_SC) | |
35 | int type_of_call killf(pid, sig) | |
36 | #endif | |
37 | #if defined(CERNLIB_QXCAPT) | |
38 | int type_of_call KILLF(pid, sig) | |
39 | #endif | |
40 | int *pid, *sig; | |
41 | { | |
42 | #ifndef WIN32 | |
43 | int kill(); | |
44 | int pidu, sigu, istat; | |
45 | ||
46 | pidu = *pid; | |
47 | sigu = *sig; | |
48 | istat = kill(pidu, sigu); | |
49 | return istat; | |
50 | #else | |
51 | HANDLE hProcess; | |
52 | BOOL TermSucc; | |
53 | ||
54 | hProcess= OpenProcess(PROCESS_ALL_ACCESS, TRUE, *pid); | |
55 | if (hProcess == NULL) | |
56 | TermSucc= TerminateProcess(hProcess, -1); | |
57 | return -1; | |
58 | #endif | |
59 | } | |
60 | /*> END <----------------------------------------------------------*/ |