bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)
This commit is contained in:
parent
b63a620014
commit
06afac6c57
|
@ -0,0 +1 @@
|
||||||
|
Add :func:`os.set_blocking()` support for VxWorks RTOS.
|
|
@ -2070,7 +2070,9 @@ _Py_get_blocking(int fd)
|
||||||
int
|
int
|
||||||
_Py_set_blocking(int fd, int blocking)
|
_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__)
|
||||||
int arg = !blocking;
|
int arg = !blocking;
|
||||||
if (ioctl(fd, FIONBIO, &arg) < 0)
|
if (ioctl(fd, FIONBIO, &arg) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue