Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!rex!wpg!russ From: russ@wpg.com (Russell Lawrence) Newsgroups: comp.sys.sequent Subject: Re: Dial-in/Dial-out on same tty port Message-ID: <3602@wpg.com> Date: 25 Jan 91 01:58:18 GMT References: <1991Jan22.032421.9098@irscscm.UUCP> <31108@sequoia.execu.com> Organization: WP Group, Metairie, LA Lines: 46 In article <1991Jan22.032421.9098@irscscm.UUCP> mfaurot@bogart.UUCP (Michael Faurot) writes: > I've got a Balance running Dynix 3.14 and would like to know if there's > a program or means by which one can get both dial-in and dial-out > useage of a tty port? Please, no comments about upgrading to a > Symmetry! In article <31108@sequoia.execu.com>, keith@sequoia.execu.com (Keith Pyle) writes: > Don't bother with the Symmetry upgrade (is this comment about an upgrade > acceptable? :-). We have an S81 running 3.0.17 and Sequent still doesn't > provide for this. At least if they do, they refuse to tell us about it. > > We've tried to get this BUG fixed for some time and have had no success > with Sequent. I guess they would rather sell more ports and have us buy > more modems. One of my customers has purchased a Gpx 6070 from Basic Four which will be arriving in a few weeks, so I anticipate having to deal with the dialin/dialout problem sooner or later. Do the fopen() and fcntl() calls under dynix permit you to set and clear the O_NDLAY flag? If so, you could use one of the PD versions of uugetty to handle incoming calls without preventing folks from using the same line as a dialout port. The uugetty would open the port with O_NDLAY clear, thus causing the open() to hang until CD goes high on the modem. When that happens, the uugetty checks for the existence of a lock file in usr/spool/locks (or whereever locks are maintained under dynix). If it finds a lockfile, it checks the process identified by the PID number in the lockfile to see if the process that created the lockfile is still active. If not, it "knows" that someone else is using the line for dialout. In this event, the uugetty goes to sleep for periodic intervals until the process is no longer active. If there isn't a lockfile, or the PID in the lockfile points to a dead process, uugetty behaves like a normal 'getty' program... setting the line discipline, fetching the user's name, and subsequently exec-ing 'login'. The potential problem (???) is that open() under dynix may not hang under certain circumstances. If so, you could still work around the problem, but the solution might be messy. -- Russell Lawrence, WP Group, New Orleans (504) 443-5000 russ@wpg.com uunet!wpg!russ