s6
Software
skarnet.org
The s6-ipcserver-socketbinder program
s6-ipcserver-socketbinder binds a Unix domain
socket, then executes a program.
Interface
s6-ipcserver-socketbinder [ -d | -D ] [ -b backlog ] path prog...
- s6-ipcserver-socketbinder creates a Unix domain socket of type SOCK_STREAM
and binds it to path. It prepares the socket to accept
connections by calling
listen().
- It then execs into prog... with the open socket
as its standard input.
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()
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.
Notes
- 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 to accept connections
from clients, or into a program such as
s6-applyuidgid
to drop privileges before doing so.
- The s6-ipcserver 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 followed by the
application program, and executing into it.