- :data:`RWF_APPEND`
- :data:`RWF_DONTCACHE`
- :data:`RWF_ATOMIC`
+ - :data:`RWF_NOSIGNAL`
Return the total number of bytes actually written.
.. versionadded:: 3.10
+.. data:: RWF_NOSIGNAL
+
+ Prevent pipe and socket writes from raising :const:`~signal.SIGPIPE`.
+ This flag is meaningful only for :func:`os.pwritev`.
+
+ .. availability:: Linux >= 6.18.
+
+ .. versionadded:: 3.16
+
+
.. function:: read(fd, n, /)
Read at most *n* bytes from file descriptor *fd*.
"- RWF_APPEND\n"
"- RWF_DONTCACHE\n"
"- RWF_ATOMIC\n"
+"- RWF_NOSIGNAL\n"
"\n"
"Using non-zero flags requires Linux 4.7 or newer.");
#ifndef OS__EMSCRIPTEN_LOG_METHODDEF
#define OS__EMSCRIPTEN_LOG_METHODDEF
#endif /* !defined(OS__EMSCRIPTEN_LOG_METHODDEF) */
-/*[clinic end generated code: output=d81494ceb6ce44ed input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d641f02a97057666 input=a9049054013a1b77]*/
- RWF_APPEND
- RWF_DONTCACHE
- RWF_ATOMIC
+- RWF_NOSIGNAL
Using non-zero flags requires Linux 4.7 or newer.
[clinic start generated code]*/
static Py_ssize_t
os_pwritev_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
int flags)
-/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=b2e352a22f030e9a]*/
+/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=c202f24f01fa66c9]*/
{
Py_ssize_t cnt;
Py_ssize_t result;
#ifdef RWF_APPEND
if (PyModule_AddIntConstant(m, "RWF_APPEND", RWF_APPEND)) return -1;
#endif
+#ifdef RWF_NOSIGNAL
+ if (PyModule_AddIntConstant(m, "RWF_NOSIGNAL", RWF_NOSIGNAL)) return -1;
+#endif
/* constants for splice */
#if defined(HAVE_SPLICE) && defined(__linux__)