Thread View: mod.computers.masscomp
1 messages
1 total messages
Started by Jeff
Tue, 01 Jul 1986 23:44
Re: using masscomp ptys
Author: Jeff
Date: Tue, 01 Jul 1986 23:44
Date: Tue, 01 Jul 1986 23:44
29 lines
1747 bytes
1747 bytes
The program has 2 major problems: It opens the wrong device, and it never reads from the master pseudo-tty. The string '/dev/ptyp%1x' in ptyopen should be replaced with '/dev/pty%1x', otherwise the open always fails. After this is done, the program execs the script properly, which then blocks on the second stty command. The problem is that the stty command produces output, which is not redirected, so it is written to the tty (pseudo-tty). There is a 256 character buffer for each tty device, and when this fills, the write blocks. There are 2 solutions: read (or flush) from the master side, or simply redirect the output of the stty commands. Included is a version of 'ourcom' that works. By works, I mean that the file dd.CKP shows up and is not scrambled. I'm not sure what is wrong with the original poster's system, but his program seems to work as intended. For those of you that have access to UNIX sources, the 'script' program gives a much better (read: faster) way to search for available pty's, and a cleaner manipulation of them afterwards. #!/bin/sh stty all > stty1.CKP 2>&1 stty raw -echo 110 # stty new cbreak stty all > stty2.CKP 2>&1 exec dd of=dd.CKP bs=1 count=15719 [Thanks for the information! - sob]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads