fork-job/pty => fork-pty-session.fork-pty-session now closes pty port in child.
This commit is contained in:
		
							parent
							
								
									abe91e9fd9
								
							
						
					
					
						commit
						bd91c003cc
					
				|  | @ -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))) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 shivers
						shivers