mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
added simple test for signal handling in os/proc-kill using :kill
This commit is contained in:
parent
0b58e505ee
commit
71d51c160d
@ -52,6 +52,11 @@
|
|||||||
(def retval (os/proc-wait p))
|
(def retval (os/proc-wait p))
|
||||||
(assert (not= retval 24) "Process was *not* terminated by parent"))
|
(assert (not= retval 24) "Process was *not* terminated by parent"))
|
||||||
|
|
||||||
|
(let [p (os/spawn [janet "-e" `(do (ev/sleep 30) (os/exit 24)`] :p)]
|
||||||
|
(os/proc-kill p false :kill)
|
||||||
|
(def retval (os/proc-wait p))
|
||||||
|
(assert (not= retval 24) "Process was *not* terminated by parent"))
|
||||||
|
|
||||||
# Parallel subprocesses
|
# Parallel subprocesses
|
||||||
|
|
||||||
(defn calc-1
|
(defn calc-1
|
||||||
|
Loading…
Reference in New Issue
Block a user