-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTEMS silently discards non-selectable file handles in OS_SelectMultiple() #921
Comments
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Mar 22, 2021
Do not silently ignore a filehandle which was included in the OS_FdSet but the "selectable" flag is false. Instead translate this to the OS_ERR_OPERATION_NOT_SUPPORTED error.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Mar 22, 2021
Do not silently ignore a filehandle which was included in the OS_FdSet but the "selectable" flag is false. Instead translate this to the OS_ERR_OPERATION_NOT_SUPPORTED error.
This was referenced Mar 22, 2021
astrogeco
added a commit
that referenced
this issue
Mar 22, 2021
Fix #921, make non-selectable FD an error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The conversion from the
OS_FdSet
to the internalfd_set
inside OS_FdSet_ConvertIn_Impl() will ignore filehandles for which theselectable
flag is not set. The select() is then called without this file included in the set, and the result is returned.This is misleading because the user is not aware that the implementation ignored one (or more) if the filehandles in the set. If the user requested it by including in the set, it should return an error to the caller, not silently ignore.
To Reproduce
Now exposed by unit tests in the current IC (this makes the function no longer return OS_ERR_OPERATION_NOT_SUPPORTED and the test that should be skipped is not actually skipped because of this).
Expected behavior
Return an error instead of silently ignoring the handle for which select() cannot be done.
System observed on:
RTEMS 4.11.3
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: