🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: mod.computers.masscomp
Article #26

Re: using masscomp ptys

#26
From: Jeff
Date: Tue, 01 Jul 1986 23:44
29 lines
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]
Technical Details
Message-ID: <969@soma.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!decvax!bellcore!ulysses!cbosgd!soma!Jeff Carter

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!decvax!bellcore!ulysses!cbosgd!soma!Jeff Carter
From: Jeff@soma.UUCP
Newsgroups: mod.computers.masscomp
Subject: Re: using masscomp ptys
Message-ID: <969@soma.UUCP>
Date: Tue, 1-Jul-86 19:44:22 EDT
Article-I.D.: soma.969
Posted: Tue Jul  1 19:44:22 1986
Date-Received: Wed, 2-Jul-86 20:47:28 EDT
Sender: masscomp@soma.UUCP
Organization: Masscomp Users' Society
Lines: 29
Approved: masscomp@soma.uucp