Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!sun-arpa!male!pitstop!texsun!texbell!killer!letni!doug From: doug@letni.LawNet.Com (Doug Davis) Newsgroups: comp.mail.uucp Subject: Re: Bidirectional Modem Lines under SunOS 4.0.1 Summary: more xenix stupidity.. Message-ID: <1965@letni.LawNet.Com> Date: 18 Apr 89 20:28:26 GMT References: <160@osc.COM> <743@key.COM> <2209@laidbak.UUCP> <1404@auspex.auspex.com> <3774@ficc.uu.net> <13570@ncoast.ORG> Reply-To: doug@letni.LawNet.Com (Doug Davis) Organization: LawNet Inc. Texas R&D Offices Lines: 52 In article <13570@ncoast.ORG> allbery@ncoast.UUCP (Brandon S. Allbery) writes: >As quoted from <3774@ficc.uu.net> by peter@ficc.uu.net (Peter da Silva): >+--------------- >| We do it this way on Xenix 3.5, because it's the only way to do it, and I'm >| having to rewrite init to track this multiple-tty-name stuff and clear >| BOTH entries. It's a pain. >+--------------- > >Uh, Peter, is SCO Xenix *really* so broken that O_NDELAY and/or CLOCAL don't >work? I've used them in Microsoft Xenix 3.x (untouched by SCO) and UNIX >System III; they work fine. Sorry Brandon, that piece of code won't work under SCO given the conditions described by the original article. If you have a process sitting on a port i=open("/dev/ttxx", O_RDWR) so it is blocked waiting for a carrier. You have to do some real bizzaro-twists to make a dialer dial out across it. This is from memory, it should be fairly close.... /* * Open the tty */ tty = open("/dev/ttyxx", O_RDWR | O_NDELAY); (void) fcntl(tty, F_SETFL, fcntl(tty, F_GETFL, 0) & ~O_NDELAY); if (ioctl(tty, TCGETA, &ttystuf) != 0) (void) boom(); /* set all the flags stuff up */ ttbuf.c_cflag |= CLOCAL; (void) ioctl(tty, TCSETA, &ttystuf); tmptty = open (dcname, O_RDWR); if (tmptty > 0) { close(tty); tty = tmptty; } /* * Now 'tty' is set up correctly and you can dial out... */ The "trick" lies in the open/close the second open is the fd that is set correcty. What's real fun is the original processes never unblocks and now, never will. Even when you force carrier onto the port. If there is interest I can provide info on how to make a 'uugetty' work. (you won't like it either, but it does work) About a year ago, myself and some people I worked with reported this to SCO, I suspect nothing has been done about it since all the new stuff I have from them *STILL* has the same buggy tty drivers. --- Doug Davis/LawNet/1030 Pleasant Valley Lane/Arlington/Texas/76015/817-467-3740 {sys1.tandy.com, motown!sys1, uiucuxc!sys1 lawnet, killer, texbell} letni!doug Same siggie, .9832% less filling..