io.launcher.unix: Fix test.
parent
50cf54ddde
commit
6f6bc00cb1
|
@ -1,12 +1,10 @@
|
|||
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
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ continuations environment fry io.backend io.backend.unix
|
|||
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 )
|
||||
|
@ -104,10 +105,8 @@ M: unix (kill-process) ( process -- )
|
|||
: 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
|
||||
|
|
Loading…
Reference in New Issue