diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-10-07 15:44:44 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@gmail.com> | 2011-10-07 15:44:44 +0200 |
commit | 3be9d76fa2e56a9715e8151d9b6802da5b38512a (patch) | |
tree | f33df39524c9cce45a9f844c3bf37b98071ff648 /src/common/util.c | |
parent | 105cc42e96ea979b1111f3ba0d410c510cd229f0 (diff) | |
download | tor-3be9d76fa2e56a9715e8151d9b6802da5b38512a.tar.gz tor-3be9d76fa2e56a9715e8151d9b6802da5b38512a.zip |
Make it compile on Windows™.
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c index 4a66e93537..a0777eae3d 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2966,20 +2966,18 @@ int tor_terminate_process(pid_t pid) { #ifdef MS_WINDOWS - DWORD pid_win = pid; - DWORD err; HANDLE handle; /* If the signal is outside of what GenerateConsoleCtrlEvent can use, attempt to open and terminate the process. */ handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); - if (handle == NULL) + if (!handle) return -1; - if (TerminateProcess(handle, sig) == 0) + if (!TerminateProcess(handle, 0)) return -1; else return 0; -#else /* *nix */ +#else /* Unix */ return kill(pid, SIGTERM); #endif } |