io.launcher.unix: Fix test.
parent
50cf54ddde
commit
6f6bc00cb1
|
@ -1,12 +1,10 @@
|
||||||
USING: accessors calendar concurrency.promises continuations
|
USING: accessors calendar concurrency.promises destructors io
|
||||||
debugger.unix destructors io io.backend.unix io.directories
|
io.backend.unix io.directories io.encodings.ascii
|
||||||
io.encodings.ascii io.encodings.binary io.encodings.utf8
|
io.encodings.binary io.encodings.utf8 io.files io.launcher
|
||||||
io.files io.launcher io.launcher.unix io.streams.duplex
|
io.streams.duplex io.timeouts kernel libc locals math namespaces
|
||||||
io.timeouts kernel libc locals math namespaces sequences threads
|
sequences threads tools.test unix.process unix.signals ;
|
||||||
tools.test unix.process ;
|
|
||||||
IN: io.launcher.unix.tests
|
IN: io.launcher.unix.tests
|
||||||
|
|
||||||
|
|
||||||
[
|
[
|
||||||
{ } [ { "touch" "launcher-test-1" } try-process ] unit-test
|
{ } [ { "touch" "launcher-test-1" } try-process ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ continuations environment fry io.backend io.backend.unix
|
||||||
io.files.private io.files.unix io.launcher io.launcher.private
|
io.files.private io.files.unix io.launcher io.launcher.private
|
||||||
io.pathnames io.ports kernel libc math namespaces sequences
|
io.pathnames io.ports kernel libc math namespaces sequences
|
||||||
simple-tokenizer strings system unix unix.ffi unix.process ;
|
simple-tokenizer strings system unix unix.ffi unix.process ;
|
||||||
|
QUALIFIED-WITH: unix.signals sig
|
||||||
IN: io.launcher.unix
|
IN: io.launcher.unix
|
||||||
|
|
||||||
: get-arguments ( process -- seq )
|
: get-arguments ( process -- seq )
|
||||||
|
@ -104,10 +105,8 @@ M: unix (kill-process) ( process -- )
|
||||||
: find-process ( handle -- process )
|
: find-process ( handle -- process )
|
||||||
processes get keys [ handle>> = ] with find nip ;
|
processes get keys [ handle>> = ] with find nip ;
|
||||||
|
|
||||||
TUPLE: signal n ;
|
|
||||||
|
|
||||||
: code>status ( code -- obj )
|
: code>status ( code -- obj )
|
||||||
dup WIFSIGNALED [ WTERMSIG signal boa ] [ WEXITSTATUS ] if ;
|
dup WIFSIGNALED [ WTERMSIG sig:signal boa ] [ WEXITSTATUS ] if ;
|
||||||
|
|
||||||
M: unix (wait-for-processes) ( -- ? )
|
M: unix (wait-for-processes) ( -- ? )
|
||||||
{ int } [ -1 swap WNOHANG waitpid ] with-out-parameters
|
{ int } [ -1 swap WNOHANG waitpid ] with-out-parameters
|
||||||
|
|
Loading…
Reference in New Issue