summaryrefslogtreecommitdiff
path: root/Include/fileutils.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-29 22:32:47 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-07-29 22:32:47 +0200
commit1db9e7bb19909ed56821b1580cbb024faccac041 (patch)
tree20043197ec08844340c9ac039fe26c630bd4189d /Include/fileutils.h
parent6aa4269ed25f7fdddd99fe1d7b09b8406ecb05ea (diff)
downloadcpython-git-1db9e7bb19909ed56821b1580cbb024faccac041.tar.gz
Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get and
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is set, True otherwise). These functions are not available on Windows.
Diffstat (limited to 'Include/fileutils.h')
-rw-r--r--Include/fileutils.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h
index e9bad80b87..f2a43f75c4 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -70,7 +70,14 @@ PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
int *atomic_flag_works);
PyAPI_FUNC(int) _Py_dup(int fd);
-#endif
+
+#ifndef MS_WINDOWS
+PyAPI_FUNC(int) _Py_get_blocking(int fd);
+
+PyAPI_FUNC(int) _Py_set_blocking(int fd, int blocking);
+#endif /* !MS_WINDOWS */
+
+#endif /* Py_LIMITED_API */
#ifdef __cplusplus
}