This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem in sysdeps/unix/sysv/linux/tcsetattr.c


I don't know anything about what motivated this change other than what I
see in the comments and the entry in ChangeLog.9 about it (1998-12-07).
As far as I can tell, this code has always been wrong and the kernel
behavior is correct.

POSIX specifies that tcsetattr fails with EINVAL only if none of the
settings requested could be done.  If some could be done but others are not
supported by the hardware, then it sets some and doesn't change others.
The pty "hardware" doesn't support changing the PARENB|CREAD|CSIZE bits, so
having them never change regardless of what's requested is correct.  Since
it does succeed in setting the other attributes you asked for (such as the
fictional baud rate), there is never a reason it should return EINVAL.

I think the code that does TCGETS and checks should just be removed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]