Skip to content
Snippets Groups Projects
Commit 2e1f76f6 authored by wlott's avatar wlott
Browse files

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.
parent ce56bcab
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
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