EXEC-PATH-LIST is now a fluid.

This commit is contained in:
olin-shivers 2001-03-11 18:58:54 +00:00
parent 9da196627f
commit d708ef06e2
2 changed files with 10 additions and 10 deletions

View File

@ -184,6 +184,7 @@
string-lib string-lib
fluids ; For exec-path-list
loopholes ; For my bogus CALL-TERMINALLY implementation. loopholes ; For my bogus CALL-TERMINALLY implementation.
scheme scheme
@ -451,4 +452,3 @@
handle handle
threads) ; sleep threads) ; sleep
(files dot-locking)) (files dot-locking))

View File

@ -813,7 +813,7 @@
(%exec prog (cons prog arglist) env)))) (%exec prog (cons prog arglist) env))))
;(define (exec-path/env prog env . arglist) ;(define (exec-path/env prog env . arglist)
; (cond ((exec-path-search (stringify prog) exec-path-list) => ; (cond ((exec-path-search (stringify prog) (fluid exec-path-list)) =>
; (lambda (binary) ; (lambda (binary)
; (apply exec/env binary env arglist))) ; (apply exec/env binary env arglist)))
; (else (error "No executable found." prog arglist)))) ; (else (error "No executable found." prog arglist))))
@ -837,7 +837,7 @@
(for-each (lambda (dir) (for-each (lambda (dir)
(let ((binary (string-append dir "/" prog))) (let ((binary (string-append dir "/" prog)))
(%%exec/errno binary argv env))) (%%exec/errno binary argv env)))
exec-path-list)))) (fluid exec-path-list)))))
(error "No executable found." prog arglist)))) (error "No executable found." prog arglist))))
@ -902,7 +902,7 @@
;;; Some globals: ;;; Some globals:
(define home-directory "") (define home-directory "")
(define exec-path-list '()) (define exec-path-list (make-fluid '()))
(define (init-scsh-vars quietly?) (define (init-scsh-vars quietly?)
(set! home-directory (set! home-directory
@ -910,7 +910,7 @@
(else (if (not quietly?) (else (if (not quietly?)
(warn "Starting up with no home directory ($HOME).")) (warn "Starting up with no home directory ($HOME)."))
"/"))) "/")))
(set! exec-path-list (set-fluid! exec-path-list
(cond ((getenv "PATH") => split-colon-list) (cond ((getenv "PATH") => split-colon-list)
(else (if (not quietly?) (else (if (not quietly?)
(warn "Starting up with no path ($PATH).")) (warn "Starting up with no path ($PATH)."))