Re: ttyS1 hangs, cua1 works fine

Gert Doering (gert@greenie.muc.de)
Sat, 28 Mar 1998 22:27:30 +0100 (MET)


Hi,

mlord wrote:
> > What kind of processes are running on your system? Dial-In stuff? How does
> > the "chat dial-up script" look like? Do you have a mgetty process running?
>
> No mgetty (or getty) running.
>
> Since posting, I've determined:
>
> /dev/ttyS1 works *once* after each boot,
> but when I then kill pppd, it never works again.
> /dev/cua1 doesn't care -- always works fine.

Sounds pretty deterministic.

> Maybe killing pppd has something to do with it.

I think so. It could be a problem with the CLOCAL being cleared (because
pppd needs to know if DCD drops), and old settings not being restored when
you kill pppd.

If CLOCAL is clear, programs can still "just so" open cua1, but have to
set the O_NONBLOCK flag to open ttyS1. Seems as if "chat" doesn't do that.

Ted, what do you think?

> Is the kernel not cleaning up properly on close of /dev/ttyS1 ??

I think this behaviour is intentional, at least CLOCAL "survives" the last
close.

On the other hand, I've always wondered *why* this is so - I'd think that
upon the last close(), the device should reset itself to a reliable-upon
default behaviour.

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