lkml.org 
[lkml]   [1998]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:1.019 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site