Function

Purpleinput_pipe

Declaration [src]

int
purple_input_pipe (
  int* pipefd
)

Description [src]

Creates a pipe - an unidirectional data channel that can be used for interprocess communication.

File descriptors for both ends of pipe will be written into provided array. The first one (pipefd[0]) can be used for reading, the second one (pipefd[1]) for writing.

On Windows it’s simulated by creating a pair of connected sockets, on other systems pipe() is used.

Parameters

pipefd

Type: int*

Array used to return file descriptors for both ends of pipe.

The data is owned by the caller of the function.

Return value

Type: int

0 on success, -1 on error.