Function

GLibUnixPipeget

since: 2.80

Declaration [src]

int
g_unix_pipe_get (
  GUnixPipe* self,
  GUnixPipeEnd end
)

Description [src]

Return one of the ends of the pipe. It remains owned by self.

This function is async-signal safe (see signal(7) and signal-safety(7)), making it safe to call from a signal handler or a GSpawnChildSetupFunc.

This function preserves the value of errno.

Available since: 2.80

This function is not directly available to language bindings.

Parameters

self

Type: GUnixPipe

A pair of file descriptors.

The data is owned by the caller of the function.
end

Type: GUnixPipeEnd

One of the ends of the pipe.

Return value

Type: int

A non-negative file descriptor owned by self, which must not be closed by the caller, or a negative number if the corresponding end of the pipe was already closed or stolen.