From aaacd2a34942ec870ee0b2d220722d8722a31f2d Mon Sep 17 00:00:00 2001 From: Slava Pestov <slava@slava-pestovs-macbook-pro.local> Date: Wed, 14 Apr 2010 22:45:30 -0700 Subject: [PATCH] unix.process: use if-zero instead of re-inventing it --- basis/unix/process/process.factor | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/basis/unix/process/process.factor b/basis/unix/process/process.factor index 4b33c37d07..1e9129af58 100644 --- a/basis/unix/process/process.factor +++ b/basis/unix/process/process.factor @@ -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