Skip to content

Conversation

@jphickey
Copy link
Contributor

Describe the contribution
On some OS's (notably RTEMS) one must only call select() socket file handles. This is indicated in OSAL via the "selectable" flag on each file handle. The select implementation needs to check this before invoking select().

Also update unit tests to match.

Fix #453

Testing performed
Confirm unit tests passing on relevant platforms

Expected behavior changes
Calls to select APIs on RTEMS where unsupported will return OS_ERR_OPERATION_NOT_SUPPORTED, rather than crashing.

System(s) tested on
Ubuntu 20.04 (native)
RTEMS 4.11 on i686 via QEMU

Additional context
This also affects #377 in that it improves the test, but the functional test still could be better in that it currently only checks for file handles being set, not file handles being unset, after select.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Confirm that the "selectable" flag is set before
calling the underlying select() API.

Also update unit tests to match.
@jphickey
Copy link
Contributor Author

This PR is merged into #461 due to unit test dependencies. Closing separate PR.

@jphickey jphickey closed this May 15, 2020
@jphickey jphickey deleted the fix-453-select-api branch December 3, 2020 17:41
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Portable select() implementation needs to check filehandle "selectable" flag

2 participants