Startup and top changed so that -e entry points get the whole command line,

including the program name.

syscalls.scm has a trivial documentation upgrade.
This commit is contained in:
shivers 1996-10-31 20:18:11 +00:00
parent e45e9a6b0d
commit 26b8de258e
3 changed files with 13 additions and 13 deletions

View File

@ -50,15 +50,15 @@
(define (scsh-stand-alone-resumer start)
(usual-resumer ;sets up exceptions, interrupts, and current input & output
(lambda (args)
(lambda (args) ; VM gives us our args, but not our program.
(init-scsh-hindbrain #t) ; Whatever. Relink & install scsh's I/O system.
(call-with-current-continuation
(lambda (halt)
(set! %full-command-line args)
(set-command-line-args! (cons "" args)) ; WRONG.
(set! %vm-prog-args (cons "scsh" args)) ; WRONG -- use image.
(set-command-line-args! %vm-prog-args)
(with-handler (simple-condition-handler halt (error-output-port))
(lambda ()
(let ((exit-val (start command-line-arguments)))
(let ((exit-val (start (command-line))))
(if (integer? exit-val) exit-val 0))))))))) ; work around bug.
(define %full-command-line #f)
(define %vm-prog-args #f)

View File

@ -1072,11 +1072,11 @@
(define-errno-syscall (%fcntl-read fd command) %fcntl-read/errno value)
(define-errno-syscall (%fcntl-write fd command val) %fcntl-write/errno)
;;; fcntl()'s F_GETFD and F_SETFD.
;;; Note that the SLEAZY- prefix on the CALL/FDES isn't an optimisation.
;;; Straight CALL/FDES modifies unrevealed file descriptors by clearing
;;; their CLOEXEC bit when it reveals them -- so it would interfere with
;;; the reading.
;;; fcntl()'s F_GETFD and F_SETFD. Note that the SLEAZY- prefix on the
;;; CALL/FDES isn't an optimisation; it's *required* for the correct behaviour
;;; of these procedures. Straight CALL/FDES modifies unrevealed file
;;; descriptors by clearing their CLOEXEC bit when it reveals them -- so it
;;; would interfere with the reading and writing of that bit!
(define (fdes-flags fd/port)
(sleazy-call/fdes fd/port

View File

@ -214,9 +214,9 @@
name))
(define (parse-switches-and-execute args context)
(define (parse-switches-and-execute all-args context)
(receive (switches term-switch term-val top-entry args)
(parse-scsh-args args)
(parse-scsh-args (cdr all-args))
((with-new-session context ; "Log in" user.
(current-input-port) (current-output-port)
args
@ -231,7 +231,7 @@
(if (string? term-val)
term-val ; Script file.
"file-descriptor-script"); -s<num>
"scsh")
(car all-args))
args))
;; Set HOME-DIRECTORY and EXEC-PATH-LIST,