]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/process/process.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / unix / process / process.factor
index ec782f5164ef74befd3f66dce0fc61f15e69e4af..131d8dda5dc681488a36296ed79400f63dcd6009 100644 (file)
@@ -1,6 +1,6 @@
-USING: kernel alien.c-types alien.strings sequences math alien.syntax unix
-vectors kernel namespaces continuations threads assocs vectors
-io.backend.unix io.encodings.utf8 unix.utilities constants ;
+USING: kernel alien.c-types alien.strings sequences math alien.syntax
+unix namespaces continuations threads assocs io.backend.unix
+io.encodings.utf8 unix.utilities fry ;
 IN: unix.process
 
 ! Low-level Unix process launching utilities. These are used
@@ -36,7 +36,7 @@ FUNCTION: int execve ( char* path, char** argv, char** envp ) ;
     [ [ first ] [ ] bi ] dip exec-with-env ;
 
 : with-fork ( child parent -- )
-    [ [ fork-process dup zero? ] dip [ drop ] prepose ] dip
+    [ [ fork-process dup zero? ] dip '[ drop @ ] ] dip
     if ; inline
 
 CONSTANT: SIGKILL 9
@@ -80,7 +80,7 @@ CONSTANT: WNOWAIT    HEX: 1000000
     HEX: ff00 bitand -8 shift ; inline
 
 : WIFSIGNALED ( status -- ? )
-    HEX: 7f bitand 1+ -1 shift 0 > ; inline
+    HEX: 7f bitand 1 + -1 shift 0 > ; inline
 
 : WCOREFLAG ( -- value )
     HEX: 80 ; inline