glib-unix: Add convenience API for pipes

We can't easily use g_autofd with g_unix_open_pipe, because its
parameter is an array of two fds that both need closing. Add an inline
convenience wrapper providing the obvious semantics.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2023-05-30 16:06:33 +01:00
committed by Philip Withnall
parent 6fd1037361
commit f31db7d370
3 changed files with 222 additions and 0 deletions

View File

@@ -2296,6 +2296,16 @@ G_UNIX_ERROR
g_unix_open_pipe
g_unix_set_fd_nonblocking
<SUBSECTION>
GUnixPipe
G_UNIX_PIPE_INIT
GUnixPipeEnd
g_unix_pipe_open
g_unix_pipe_get
g_unix_pipe_steal
g_unix_pipe_close
g_unix_pipe_clear
<SUBSECTION>
g_unix_signal_add
g_unix_signal_add_full