Re: ttyS1 hangs, cua1 works fine

Gert Doering (gert@greenie.muc.de)
Wed, 1 Apr 1998 23:17:17 +0200 (MEST)


Hi,

tytso@mit.edu wrote:
> From: gert@greenie.muc.de (Gert Doering)
> Date: Sun, 29 Mar 1998 21:47:19 +0200 (MEST)
>
> Ted, what do you think about automatically resetting the port to "CLOCAL
> defaults to 'set'" after the last close()? Does POSIX say anything about
> the default values of the c_cflag termios flags?
>
> POSIX says nothing about the default values of the c_cflag termios
> flags. Setting CLOCAL after the last close is a possibility; I can
> imagine people asking the question of "why CLOCAL and not with other
> flags",

I agree.

> and the ability to set termios flags from the shell with
> intervening periods where the port isn't open is a nice feature to
> keep.

It's unusual (among Unixes), but handy, yes.

> So it's a possibility, but my preferred solution is to add new
> functionality to stty to make it easier to set the termios flags, even
> when CLOCAL is clear.
>
> Here's my proposed patch to the shell-utils package which provides the
> necessary functionality.

That would be a solution, but only for people reading documentation. I
think there will still be many questions "so I changed to ttyS* and my xyz
broke".

What about adding a "bit mask" of flags that get reset after close()?
This mask would only contain CLOCAL, by default, but you could add other
flags, or remove CLOCAL. That way, everybody can have it the way he likes
best...

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert.doering@physik.tu-muenchen.de

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu