From bd91c003ccecdfb35d9a86781f17e2a917612f63 Mon Sep 17 00:00:00 2001 From: shivers Date: Fri, 27 Oct 1995 08:57:10 +0000 Subject: [PATCH] fork-job/pty => fork-pty-session.fork-pty-session now closes pty port in child. --- scsh/pty.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)))