From 1d313bf5f0d296d766bd3a0e6d030df37c71711b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 19 Sep 2022 22:27:10 +0200 Subject: 'pipe' now takes an optional 'flags' parameter. This is the same strategy as used for the 'accept4' bindings introduced in 6e0965104c579431e5a786b60e1a964a112c73b8. * libguile/posix.c (scm_pipe): Rename to... (scm_pipe2): ... this. Add an optional 'flags' parameter and honor it. (scm_pipe): Rewrite as a call to 'scm_pipe2'. * libguile/posix.h (scm_pipe2): New declaration. * test-suite/tests/posix.test ("pipe"): New tests. * configure.ac: Look for 'pipe2'. * NEWS: Update. --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 05bd1f6e5..19d314f4a 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,13 @@ pass O_CLOEXEC to the underlying `open' call. It can now be done by appending "e" to the `mode' string passed as a second argument. See "File Ports" in the manual for more info. +** `pipe' now takes flags as an optional argument + +This lets you pass flags such as O_CLOEXEC and O_NONBLOCK, as with the +pipe2(2) system call found on GNU/Linux and GNU/Hurd, instead of having +to call `fnctl' afterwards. See "Ports and File Descriptors" in the +manual for details. + ** Abstract Unix-domain sockets are supported It is now possible to create an AF_UNIX socket with a leading zero byte -- cgit v1.2.1