Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :func:`os.set_blocking()` support for VxWorks RTOS.
4 changes: 3 additions & 1 deletion Python/fileutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,9 @@ _Py_get_blocking(int fd)
int
_Py_set_blocking(int fd, int blocking)
{
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)
/* bpo-41462: On VxWorks, ioctl(FIONBIO) only works on sockets.
Use fcntl() instead. */
#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.

int arg = !blocking;
if (ioctl(fd, FIONBIO, &arg) < 0)
goto error;
Expand Down