1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-15 15:57:41 +00:00

Add TerminateProcess to janet_proc_gc and os_proc_kill on Windows

This commit is contained in:
Andrew Owen
2021-07-11 03:21:55 -06:00
parent 87f8fe14dd
commit 12cfda1f58
2 changed files with 7 additions and 0 deletions

View File

@@ -47,6 +47,11 @@
(assert-no-error "pipe stdin to process 2" (os/proc-wait p))
(assert (= "hello!" (string/trim x)) "round trip pipeline in process"))
(let [p (os/spawn [janet "-e" `(do (ev/sleep 30) (os/exit 24)`] :p)]
(os/proc-kill p)
(def retval (os/proc-wait p))
(assert (not= retval 24) "Process was *not* terminated by parent"))
# Parallel subprocesses
(defn calc-1