dougc@uswat.uswest.com (Doug Corey) (11/04/90)
We are building an application that uses modems attached to serial ports. The work is on a Sun 4 running the Sun 4.0.3 OS. No getty is run on these ports. In effect, the application takes the place of getty but handles outgoing calls as well as incoming calls. Since the application is in the development stage, it has bugs, one of which (not sure why yet) causes the port to "hang". That is the port (tty driver) is no longer communicative and doesn't respond to ioctl() or stty. The only way we've found to clear the problem is to reboot the machine. "kill -1 1" doesn't work. I assume that's because there is no getty or anything else associated with these ports (the application has been terminated). If I do "stty </dev/cuaa" when cuaa is hung (as it is now), the stty doesn't return. (Curiously, if I do a ps, I don't see the stty process, just the subshell that spawned it! Killing the subshell kills the stty call so I can get the window from which I did the stty back and I get an "interrupted system call message".) Can anyone suggest a way to clear the driver/port and return it to some stable state that doesn't require rebooting the machine? Thanks.