Skip to content

Commit 06afac6

Browse files
authored
bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)
1 parent b63a620 commit 06afac6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :func:`os.set_blocking()` support for VxWorks RTOS.

Python/fileutils.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,9 @@ _Py_get_blocking(int fd)
20702070
int
20712071
_Py_set_blocking(int fd, int blocking)
20722072
{
2073-
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)
2073+
/* bpo-41462: On VxWorks, ioctl(FIONBIO) only works on sockets.
2074+
Use fcntl() instead. */
2075+
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO) && !defined(__VXWORKS__)
20742076
int arg = !blocking;
20752077
if (ioctl(fd, FIONBIO, &arg) < 0)
20762078
goto error;

0 commit comments

Comments
 (0)