diff --git a/scsh/pty.scm b/scsh/pty.scm index 2953bfd..f974fb4 100644 --- a/scsh/pty.scm +++ b/scsh/pty.scm @@ -1,7 +1,7 @@ ;;; Pseudo terminals ;;; Copyright (c) 1995 by Olin Shivers. -;;; (fork-job/pty thunk) +;;; (fork-pty-session thunk) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Fork the process with stdio (fd's 0, 1, & 2 and also the current i/o ports) ;;; bound to a tty device. In the parent process, returns four values: @@ -16,9 +16,10 @@ ;;; The child runs with stio hooked up to the tty; the (error-output-port) ;;; port is unbuffered. -(define (fork-job/pty thunk) +(define (fork-pty-session thunk) (receive (pty-in ttyname) (open-pty) (let* ((process (fork (lambda () + (close-input-port pty-in) (become-session-leader) (let ((tty (open-control-tty ttyname open/read+write)))