Skip to content
Snippets Groups Projects
Commit 327aae7a authored by wlott's avatar wlott
Browse files

UNIX-FORK returns NIL, not -1, when it fails.

parent 32f56768
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/run-program.lisp,v 1.11 1992/02/18 02:20:01 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/run-program.lisp,v 1.12 1992/07/28 00:22:58 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -480,15 +480,16 @@ ...@@ -480,15 +480,16 @@
(multiple-value-bind (multiple-value-bind
(child-pid errno) (child-pid errno)
(unix:unix-fork) (unix:unix-fork)
(cond ((zerop child-pid) (cond ((null child-pid)
;; We are the child. Note: setup-child NEVER returns
(setup-child pfile args env stdin stdout stderr
pty-name before-execve))
((minusp child-pid)
;; This should only happen if the bozo has too ;; This should only happen if the bozo has too
;; many running procs. ;; many running procs.
(error "Could not fork child process: ~A" (error "Could not fork child process: ~A"
(unix:get-unix-error-msg errno))) (unix:get-unix-error-msg errno)))
((zerop child-pid)
;; We are the child. Note: setup-child NEVER
;; returns
(setup-child pfile args env stdin stdout stderr
pty-name before-execve))
(t (t
;; We are the parent. ;; We are the parent.
(setf proc (make-process :pid child-pid (setf proc (make-process :pid child-pid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment