io.launcher.unix: Fix test.

clean-macosx-x86-64
Doug Coleman 2019-09-27 23:13:51 -05:00
parent 50cf54ddde
commit 6f6bc00cb1
2 changed files with 7 additions and 10 deletions

View File

@ -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

View File

@ -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