Messages in this thread | | | Date | Sun, 15 Mar 1998 22:03:57 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: Warning, cua2 opened, ... |
| |
On Sun, 15 Mar 1998, Alan Cox wrote:
> > The proper way to open POSIX tty devices is as follows. First, open > > them with the O_NONBLOCK flag; this guarantees that they won't block > > waiting for carrier detect. Secondly, use the fcntl() call to clear the > > It doesnt however seem to guarantee they wont get hung up on instantly > before they can issue a tcsetattr() ? >
Just trap SIGHUP before you do anything with a tty. After you have everything set up, you can set up a handler if you need. I have many applications that use ttys on Suns, Alphas, and Linux-boxes and the the prescribed open procedure works just fine if you trap the sometimes-spurious signal first.
Cheers, Dick Johnson ***** FILE SYSTEM MODIFIED ***** Penguin : Linux version 2.1.87 on an i586 machine (66.15 BogoMips). Warning : It's hard to remain at the trailing edge of technology.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |