]> gitweb.factorcode.org Git - factor.git/commitdiff
io.launcher.unix: Fix test.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 28 Sep 2019 04:13:51 +0000 (23:13 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 28 Sep 2019 04:13:51 +0000 (23:13 -0500)
basis/io/launcher/unix/unix-tests.factor
basis/io/launcher/unix/unix.factor

index a1913058c03d3f44c8188efd68776154a95589c8..4e34966f106d0e92d3877e21aaf5ebb351034924 100644 (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
 
index ad0a76cf6796293b38cbc266a36695f690c901f1..ce75d91cc2b7cac847e1d201759914bd037a16d5 100644 (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