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 #include <sys/types.h>
28 int lyx::support::kill(int pid, int sig)
31 if (pid == (int)GetCurrentProcessId()) {
34 HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, pid);
36 lyxerr << "kill OpenProcess failed!" << endl;
39 if (!TerminateProcess(hProcess, sig)){
40 lyxerr << "kill process failed!" << endl;
41 CloseHandle(hProcess);
44 CloseHandle(hProcess);
50 return ::kill(pid, sig);