open_pipe


Description:

public bool open_pipe (int fds, int flags) throws Error

Similar to the UNIX pipe call, but on modern systems like Linux uses the pipe2 system call, which atomically creates a pipe with the configured flags.

The only supported flag currently is fd_cloexec. If for example you want to configure o_nonblock, that must still be done separately with fcntl.

This function does not take o_cloexec, it takes fd_cloexec as if for fcntl; these are different on Linux/glibc.

Parameters:

fds

Array of two integers

flags

Bitfield of file descriptor flags, as for fcntl

Returns:

true on success, false if not (and errno will be set).


Namespace: GLib.Unix
Package: glib-2.0