libdill: Structured Concurrency for C

NAME

ipc_pair - creates a pair of mutually connected IPC sockets

SYNOPSIS

#include <libdill.h>

int ipc_pair(int s[2]);

DESCRIPTION

IPC protocol is a bytestream protocol (i.e. data can be sent via bsend() and received via brecv()) for transporting data among processes on the same machine. It is an equivalent to POSIX AF_LOCAL sockets.

This function creates a pair of mutually connected IPC sockets.

The sockets can be cleanly shut down using ipc_close() function.

RETURN VALUE

Zero in case of success. On error, it returns -1 and sets errno to one of the values below.

ERRORS

EXAMPLE

int s[2];
int rc = ipc_pair(s);