Initialize session and user-environment correctly.

This commit is contained in:
mainzelm 2001-11-27 18:11:38 +00:00
parent 0602e0707f
commit 6e7ae9448f
2 changed files with 13 additions and 2 deletions

View File

@ -280,6 +280,7 @@
package-commands-internal
filenames ; translate
usual-resumer ; usual-resumer
environments ; with-interaction-environment
fluids-internal ; JMG: get-dynamic-env
scsh-utilities
interrupts

View File

@ -43,6 +43,7 @@
;;; This is what we export to the user for his programs.
(define (dump-scsh-program start filename)
(let ((context (user-context)))
(really-dump-scsh-program (lambda (args)
(with-scsh-sighandlers
#f
@ -52,8 +53,17 @@
(install-env)
(initialize-cwd)
(init-scsh-vars #f) ; Do it quietly.
(start args))))))
filename))
(start-new-session context
(current-input-port)
(current-output-port)
(current-error-port)
args
#f)
(with-interaction-environment
(user-environment)
(lambda ()
(start args))))))))
filename)))
(define (scsh-stand-alone-resumer start)