Bug 84985 - ioctl(TCSETS,...) doesn't report illegal values
Summary: ioctl(TCSETS,...) doesn't report illegal values
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Alan Cox
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-02-24 18:26 UTC by Ulrich Drepper
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-11-11 23:51:28 UTC

Attachments (Terms of Use)

Description Ulrich Drepper 2003-02-24 18:26:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030221

Description of problem:
The POSIX standard requires that tcsetattr (implemented using ioctl on Linux)
reports invalid values in its parameters.  The Linux ioctl() implementation
instead works around them.  See


for more details.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.call tcsetattr with invalid c_cflag valuses set

Additional info:

Comment 1 Roland McGrath 2003-02-24 20:06:09 UTC
We need to examine the test suite to determine if there is really a bug here.
The POSIX.1 definition of tcsetattr says that tcsetattr should succeed if it
was able to make any of the changes, and fail with EINVAL only if it was not
able to make any of the change specified by the new struct termios at all.
So, if the test suite makes calls that change only some unsupported bits,
then it should get EINVAL.  But e.g. a call that sets the PARENB bit when
not supported by the device, and also changes some other bit like ICANON at
the same time must return success after changing only ICANON and not PARENB.

Note You need to log in before you can comment on or make changes to this bug.