Page MenuHomePhabricator

Investigate Better Ways to Kill/Timeout Subprocesses
Open, MediumPublic



Within the Node test environment, subprocesses opened as separate shells can't be killed (e.g. with spawnedProcess.kill( 'SIGKILL' ). For this reason, the WASM executors (which have to be run in shells) are now run in a double-wrapped subprocess, with the inner subprocess not detached from the outer.

The timeout command also doesn't work on spawned subprocesses within Node tests. Among other things, attempting to use timeout when spawning the WASM executor subprocesses causes a strange error in wasmedge's Rust layer.

If we investigated the causes of these issues, we could mitigate the confusion in the current subprocess layout.

Completion checklist

Event Timeline

The better way will be to use wasmedge's time limit. Should we close this as a duplicate of T360543?