Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!ukma!cwjcc!hal!ncoast!allbery From: allbery@ncoast.ORG (Brandon S. Allbery) Newsgroups: comp.mail.uucp Subject: Re: Bidirectional Modem Lines under SunOS 4.0.1 Message-ID: <13570@ncoast.ORG> Date: 15 Apr 89 16:51:44 GMT References: <160@osc.COM> <743@key.COM> <2209@laidbak.UUCP> <1404@auspex.auspex.com> <3774@ficc.uu.net> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.mail.uucp Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 31 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. fd = open("/dev/ttyxx", O_RDWR|O_NDELAY); ioctl(fd, TCGETA, &ttyinfo); ttyinfo.c_cflag |= CLOCAL; ioctl(fd, TCSETA, &ttyinfo); fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NDELAY); signal(SIGALRM, timeout); alarm(120); /* send the dial command to the modem */ ttyinfo.c_cflag &= ~CLOCAL; ioctl(fd, TCSETAW, &ttyinfo); /* wait for response; timeout() catches failure */ I've never understood why SCO uses the two-file kluge. ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@ncoast.org uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu Send comp.sources.misc submissions to comp-sources-misc@ NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser