From 2e1f76f67258b245700a623fda45cc312ffd9939 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Wed, 25 Sep 1991 15:13:47 +0000 Subject: [PATCH] Instead of closing the descriptors ourself before doing the exec, set the close-on-exec bit. This allows mach:unix-execve to do it's consing under SunOS where the segv handler needs to use the fds. --- code/run-program.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/run-program.lisp b/code/run-program.lisp index ed780389f..f0f77f591 100644 --- a/code/run-program.lisp +++ b/code/run-program.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/run-program.lisp,v 1.5 1991/06/17 20:31:44 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/run-program.lisp,v 1.6 1991/09/25 15:13:47 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -339,11 +339,11 @@ (mach:unix-dup2 stdout 1)) (when stderr (mach:unix-dup2 stderr 2)) - ;; Close all other descriptors. + ;; Arange for all the unused FD's to be closed. (do ((fd (1- (mach:unix-getdtablesize)) (1- fd))) ((= fd 3)) - (mach:unix-close fd)) + (mach:unix-fcntl fd mach:f-setfd 1)) ;; Do the before-execve (when before-execve (funcall before-execve)) -- GitLab