Skip to content

bpo-41462: add os.set_blocking() support for VxWorks RTOS#21713

Merged
vstinner merged 4 commits into
python:masterfrom
Wind-River:fix-issue-31904-fileutils
Dec 7, 2020
Merged

bpo-41462: add os.set_blocking() support for VxWorks RTOS#21713
vstinner merged 4 commits into
python:masterfrom
Wind-River:fix-issue-31904-fileutils

Conversation

@pxinwr

@pxinwr pxinwr commented Aug 3, 2020

Copy link
Copy Markdown
Contributor

VxWorks does have the <sys/ioctl.h> header file. In this header file FIONBIO is also defined but the FIONBIO request is only supported on socket fd. To set the blocking/non-blocking mode, fcntl is supposed to be used. VxWorks' file system can respond to the FCNTL request of ioctl.

https://bugs.python.org/issue41462

Comment thread Python/fileutils.c
_Py_set_blocking(int fd, int blocking)
{
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO) && !defined(__VXWORKS__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment, something like:

// bpo-41462: On VxWorks, ioctl(FIONBIO) only works on sockets: use fcntl() instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

@vstinner vstinner merged commit 06afac6 into python:master Dec 7, 2020
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@pxinwr pxinwr deleted the fix-issue-31904-fileutils branch May 7, 2021 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants