unix.process: use if-zero instead of re-inventing it
parent
6556311115
commit
aaacd2a349
|
@ -36,8 +36,7 @@ FUNCTION: int execve ( c-string path, c-string* argv, c-string* envp ) ;
|
||||||
[ [ first ] [ ] bi ] dip exec-with-env ;
|
[ [ first ] [ ] bi ] dip exec-with-env ;
|
||||||
|
|
||||||
: with-fork ( child parent -- )
|
: with-fork ( child parent -- )
|
||||||
[ [ fork-process dup zero? ] dip '[ drop @ ] ] dip
|
[ fork-process ] 2dip if-zero ; inline
|
||||||
if ; inline
|
|
||||||
|
|
||||||
CONSTANT: SIGKILL 9
|
CONSTANT: SIGKILL 9
|
||||||
CONSTANT: SIGTERM 15
|
CONSTANT: SIGTERM 15
|
||||||
|
|
Loading…
Reference in New Issue