3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
13 #include "support/lyxlib.h"
15 #ifdef HAVE_SYS_TYPES_H
16 # include <sys/types.h>
30 int support::kill(int pid, int sig)
33 if (pid == (int)GetCurrentProcessId())
35 HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, pid);
37 lyxerr << "kill OpenProcess failed!" << std::endl;
40 if (!TerminateProcess(hProcess, sig)) {
41 lyxerr << "kill process failed!" << std::endl;
42 CloseHandle(hProcess);
45 CloseHandle(hProcess);
48 return ::kill(pid, sig);