-USING: accessors calendar concurrency.promises continuations
-debugger.unix destructors io io.backend.unix io.directories
-io.encodings.ascii io.encodings.binary io.encodings.utf8
-io.files io.launcher io.launcher.unix io.streams.duplex
-io.timeouts kernel libc locals math namespaces sequences threads
-tools.test unix.process ;
+USING: accessors calendar concurrency.promises destructors io
+io.backend.unix io.directories io.encodings.ascii
+io.encodings.binary io.encodings.utf8 io.files io.launcher
+io.streams.duplex io.timeouts kernel libc locals math namespaces
+sequences threads tools.test unix.process unix.signals ;
IN: io.launcher.unix.tests
-
[
{ } [ { "touch" "launcher-test-1" } try-process ] unit-test
io.files.private io.files.unix io.launcher io.launcher.private
io.pathnames io.ports kernel libc math namespaces sequences
simple-tokenizer strings system unix unix.ffi unix.process ;
+QUALIFIED-WITH: unix.signals sig
IN: io.launcher.unix
: get-arguments ( process -- seq )
: find-process ( handle -- process )
processes get keys [ handle>> = ] with find nip ;
-TUPLE: signal n ;
-
: code>status ( code -- obj )
- dup WIFSIGNALED [ WTERMSIG signal boa ] [ WEXITSTATUS ] if ;
+ dup WIFSIGNALED [ WTERMSIG sig:signal boa ] [ WEXITSTATUS ] if ;
M: unix (wait-for-processes) ( -- ? )
{ int } [ -1 swap WNOHANG waitpid ] with-out-parameters