839ec7e26c
Building with stack, it failed:
`_TerminateProcess' referenced in section `.text' of .stack-work\dist\5f9bc736\build\git-annex\git-annex-tmp\Utility\WinProcess.o: defined in discarded section `.text' of C:/Users/jenkins/AppData/Local/Programs/stack/i386-windows/ghc-8.0.2/mingw/bin/../lib/gcc/i686-w64-mingw32/5.2.0/../../../../i686-w64-mingw32/lib/../lib/libkernel32.a(dacgs01154.o)
This is a reversion of 86e638567a
,
to try the other way to implement it, which will hopefully avoid the problem.
10 lines
176 B
C
10 lines
176 B
C
#include <windows.h>
|
|
|
|
void terminatepid (DWORD pid) {
|
|
HANDLE h;
|
|
h = OpenProcess(PROCESS_TERMINATE, 0, pid);
|
|
if (h != NULL) {
|
|
TerminateProcess(h, 1);
|
|
}
|
|
CloseHandle(h);
|
|
}
|