Re: ttyS1 hangs, cua1 works fine

Theodore Y. Ts'o (tytso@MIT.EDU)
Mon, 6 Apr 1998 18:26:38 -0400


Date: Mon, 6 Apr 1998 15:10:22 -0400 (EDT)
From: "Richard B. Johnson" <root@chaos.analogic.com>

I zeroed the structure to make damn certain that there were no hidden
bits that were preventing the proper function of the device. Don't
lose track of the reason for the whole exercise was to show that we
don't need cua* and that ttyS* works perfectly well.

Huh? All you need to demontrate that ttyS* works perfectly well is to
have a program that sets CLOCAL.

If there were hidden flag bits, which there were not, then the structure
is improperly defined, which it is not.

This is certainly not true. POSIX implementations are most certainly
allowed to define new flag bits, and the structure does not become
improperly defined if they do this.

I'm very troubled that every time I try to help somebody, certain
persons, usually the same ones, respond like this.

Helping people is good; giving them the best answer possible is better.
I was not faulting you people for helping people but rather suggesting a
better, more portable solution. If people were to take your code
fragment, and incorporate it into a program, that program would not be
portable. It would be better if we were to give the users that we are
trying to help C programs which were well formed.

Don't be so defensive, O.K.? If you knew all of this already, then
simply consider it as a reminder to the other folks on linux-kernel that
perhaps didn't know these issues. We're all better off if people write
portable programs. Someday, we may need to add some bits to the termios
structure where a bzero'ed structure will really screw us over. Just
because it currently only affects systems like SCO isn't an excuse to
encourage people to write programs which the POSIX standard explicitly
defines as being non-portable.

- Ted

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