S6-IPCSERVER-SOCKETBINDER(8)

NAME
s6-ipcserver-socketbinder - bind a Unix domain socket, then execute a program

SYNOPSIS
s6-ipcserver-socketbinder [-d | -D] [-b backlog] [-M | -m] [-a perms] [-B] path prog...

DESCRIPTION
s6-ipcserver-socketbinder creates a Unix domain socket and binds it to path. It prepares the socket to accept connections by calling listen(2).

It then execs into prog... with the open socket as its standard input.

The socket is provided non-blocking by default.

s6-ipcserver-socketbinder is part of a set of basic blocks used to build a flexible Unix super-server. It normally should be given a command line crafted to make it execute into s6-ipcserverd(8) to accept connections from clients, or into a program such as s6-applyuidgid(8) to drop privileges before doing so.

The s6-ipcserver(8) program does exactly this. It implements a full Unix super-server by building a command line starting with s6-ipcserver-socketbinder and ending with s6-ipcserverd(8) followed by the application program, and executing into it.

OPTIONS

-d  Allow instant rebinding to the same path even if it has been used not long ago - this is the SO_REUSEADDR flag to setsockopt(2) and is generally used with server programs. This is the default. Note that path will be deleted if it already exists at program start time.

-D  Disallow instant rebinding to the same path.

-b backlog
    Set a maximum of backlog backlog connections on the socket - extra connection attempts will rejected by the kernel. The default is SOMAXCONN, i.e. the maximum number allowed by the system. If backlog is 0, then the socket will be created, but it will not be listening.

-M  The type of the socket will be SOCK_STREAM. This is the default.

-m  The type of the socket will be SOCK_DGRAM. Note that by default SOCK_DGRAM sockets are not connection-mode, and listen(2) will fail - so you should always give the -b0 option to s6-ipcserver-socketbinder along with -m.

-a perms
    Create the socket with permissions perms, which is an octal number from 0000 to 0777. Default is 0777, meaning everyone can connect to it. 0700 means only processes having the same uid as the s6-ipcserver-socketbinder process can connect to it.

-B  The socket will be blocking. The default is nonblocking.

SEE ALSO
s6-accessrules-cdb-from-fs(8), s6-accessrules-fs-from-cdb(8), s6-connlimit(8), s6-ioconnect(8), s6-ipcclient(8), s6-ipcserver(8), s6-ipcserver-access(8), s6-ipcserverd(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-ipcserver-socketbinder.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)