Skip to content
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

Closed
jphickey opened this issue Mar 22, 2021 · 0 comments · Fixed by #917 or #922
Closed

RTEMS silently discards non-selectable file handles in OS_SelectMultiple() #921

jphickey opened this issue Mar 22, 2021 · 0 comments · Fixed by #917 or #922
Assignees
Labels
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
The conversion from the OS_FdSet to the internal fd_set inside OS_FdSet_ConvertIn_Impl() will ignore filehandles for which the selectable 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.

@jphickey jphickey self-assigned this Mar 22, 2021
@jphickey jphickey added the bug label Mar 22, 2021
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.
astrogeco added a commit that referenced this issue Mar 22, 2021
@jphickey jphickey linked a pull request Mar 22, 2021 that will close this issue
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants