wingard@ncrcae.Columbia.NCR.COM (Steve Wingard) (03/02/90)
It didn't appear that my last posting made it out of here, so I'm going to try again. Excuse me if you've seen this before... I'm having trouble establishing a bidirectional uucp line on a STREAMS-based TTY device. The typical way to do this (running uugetty on the device from inittab) causes problems with outgoing cu calls because of the behavior of stropen(). Since uugetty's open of the TTY device waits for the DCD signal to be asserted, the stropen() call sits within its section where the STRWOPEN flag is set. Any subsequent open of the device (by cu, for instance) will sleep regardless of the setting of the O_NDELAY flag because uugetty's stropen() call will not complete, clearing the STRWOPEN flag, until an incoming call is received. The problem could be avoided by changing uugetty to open the device with O_NDELAY set also -- but this could cause problems with garbage characters coming in from the modem and wreaking havoc with uugetty. stropen() could also be modified to let processes continue past the STRWOPEN test if the O_NDELAY flag is set, but that could have dangerous implications as well (opening a stream that is in the process of being created or dismantled by another process). Has anyone developed any other workaround to the situation? Suggestions would be welcome...