Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!apple!voder!pyramid!csg From: csg@pyramid.pyramid.com (Carl S. Gutekunst) Newsgroups: comp.sys.pyramid Subject: Re: stty in 5.0 and 4.1 Message-ID: <138687@pyramid.pyramid.com> Date: 24 Dec 90 18:36:36 GMT References: <1283@lkbpyr.UUCP> <255@ptcburp.ptcbu.oz.au> Organization: Pyramid Technology Corp., Mountain View, CA Lines: 19 >I'm not sure why see different behaviour on 4.1. OSx 4.1 was broken. This is one of those really ugly cases where UNIX shows its weaknesses. The only way to "reserve" a device or file is for a process to hold it open. In Version 7, the tty device would pretty much keep whatever modes had been set by the last process that had it open. This meant, of course, that the modes on a newly opened device were indeterminate. SVR3 went the more reliable, if less useful route: all the modes are reset to a known state when the device is opened is opened for the first time. Which means that if you want to set modes on joe random device from a shell script, you need to spawn a subshell just to hold the device open and to keep the modes from going away. Why AT&T chose 300 baud for the default line speed is a different issue entirely. (I think my RSX-11 system in 1977 already had the good sense to default to 9600.)