summaryrefslogtreecommitdiff
path: root/process-win.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-23 23:57:16 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-23 23:57:16 -0400
commit36444b69593008f40ee2d0b47c894e37428435ae (patch)
tree16688f841476008664c4b70896435673b3527d7b /process-win.c
parent7391d9be671cd303fdebbf12bb9bc26958d13bf4 (diff)
found some bugs to deal with
Diffstat (limited to 'process-win.c')
-rw-r--r--process-win.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process-win.c b/process-win.c
index b24dd68..d36302b 100644
--- a/process-win.c
+++ b/process-win.c
@@ -79,6 +79,7 @@ long long process_read(Process *process, char *data, size_t size) {
void process_kill(Process *process) {
TerminateProcess(process->process_info.hProcess, 1);
+ TerminateThread(process->process_info.hThread, 1);
CloseHandle(process->pipe_read);
CloseHandle(process->pipe_write);
CloseHandle(process->process_info.hProcess);
@@ -107,4 +108,4 @@ int process_check_status(Process *process, char *message, size_t message_size) {
process_kill(process);
return -1;
}
-} \ No newline at end of file
+}