diff options
Diffstat (limited to 'tests/modules/process/process_autoexit.lua')
| -rw-r--r-- | tests/modules/process/process_autoexit.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/modules/process/process_autoexit.lua b/tests/modules/process/process_autoexit.lua new file mode 100644 index 000000000..584aaa04d --- /dev/null +++ b/tests/modules/process/process_autoexit.lua @@ -0,0 +1,13 @@ +import("core.base.process") +import("core.base.scheduler") + +function main(cmd) + for i = 1, 10 do + scheduler.co_start(function () + process.open(cmd or "xmake l os.sleep 60000") + end) + end + -- check processes status after exiting + -- we need terminate all unclosed processes automatically after parent process is exited + -- ps aux | grep sleep +end |
