unix.process: use if-zero instead of re-inventing it

release
Slava Pestov 2010-04-14 22:45:30 -07:00
parent 6556311115
commit aaacd2a349
1 changed files with 1 additions and 2 deletions
basis/unix/process

View File

@ -36,8 +36,7 @@ FUNCTION: int execve ( c-string path, c-string* argv, c-string* envp ) ;
[ [ first ] [ ] bi ] dip exec-with-env ;
: with-fork ( child parent -- )
[ [ fork-process dup zero? ] dip '[ drop @ ] ] dip
if ; inline
[ fork-process ] 2dip if-zero ; inline
CONSTANT: SIGKILL 9
CONSTANT: SIGTERM 15