X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Frun-program.lisp;h=372fe263de93bbec0c7d6a3fc5ff5ed42e1ebb9f;hb=86210c4e406c1b2ff10cc3bac0e71435867db48b;hp=286fdc63209874c73a979cdf27dec2dcecf63f5c;hpb=85f9c92558538b85540ff420fa8970af91e241a2;p=sbcl.git diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp index 286fdc6..372fe26 100644 --- a/src/code/run-program.lisp +++ b/src/code/run-program.lisp @@ -50,7 +50,7 @@ "Return the Unix environment (\"man environ\") as a list of SIMPLE-STRINGs." (c-strings->string-list (wrapped-environ))) -;;; Convert as best we can from a SBCL representation of a Unix +;;; Convert as best we can from an SBCL representation of a Unix ;;; environment to a CMU CL representation. ;;; ;;; * (UNIX-ENVIRONMENT-CMUCL-FROM-SBCL '("Bletch=fub" "Noggin" "YES=No!")) @@ -97,25 +97,21 @@ (options sb-alien:int) (rusage sb-alien:int)) -(defconstant wait-wnohang #-svr4 1 #+svr4 #o100) -(defconstant wait-wuntraced #-svr4 2 #+svr4 4) -(defconstant wait-wstopped #-svr4 #o177 #+svr4 wait-wuntraced) - (defun wait3 (&optional do-not-hang check-for-stopped) "Return any available status information on child process. " (multiple-value-bind (pid status) (c-wait3 (logior (if do-not-hang - wait-wnohang + sb-unix:wnohang 0) (if check-for-stopped - wait-wuntraced + sb-unix:wuntraced 0)) 0) (cond ((or (minusp pid) (zerop pid)) nil) ((eql (ldb (byte 8 0) status) - wait-wstopped) + sb-unix:wstopped) (values pid :stopped (ldb (byte 8 8) status)))