From eef0a274e6187d1efb8fffaf66db94b8738662a0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 8 Feb 2016 21:13:09 +0100 Subject: activate: add a new switch --inetd to enable inetd-style socket activation Previously, using --accept would enable inetd-style socket activation in addition to per-connection operation. This is now split into two switches: --accept only switches between per-connection or single-instance operation. --inetd switches between inetd-style or new-style fd passing. This breaks the interface of the tool, but given that it is a debugging tool shipped in /usr/lib/systemd/ it's not really a public interface. This change allows testing new-style per-connection daemons. --- man/systemd-activate.xml | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'man') diff --git a/man/systemd-activate.xml b/man/systemd-activate.xml index 61a2bc8608..995e6eecce 100644 --- a/man/systemd-activate.xml +++ b/man/systemd-activate.xml @@ -60,27 +60,21 @@ Description - systemd-activate can be used to - launch a socket-activated daemon from the command line for - testing purposes. It can also be used to launch single instances - of the daemon per connection (inetd-style). + systemd-activate may be used to launch a socket-activated service binary from the command + line for testing purposes. It may also be used to launch individual instances of the service binary per connection. The daemon to launch and its options should be specified after options intended for systemd-activate. - If the option is given, file descriptor - of the connection will be used as the standard input and output of - the launched process. Otherwise, standard input and output will be - inherited, and sockets will be passed through file descriptors 3 - and higher. Sockets passed through $LISTEN_FDS - to systemd-activate will be passed through to - the daemon, in the original positions. Other sockets specified - with will use consecutive descriptors. - By default, systemd-activate listens on a - stream socket, use to listen on - a datagram socket instead (see below). + If the option is given, the socket file descriptor will be used as the standard + input and output of the launched process. Otherwise, standard input and output will be inherited, and sockets will + be passed through file descriptors 3 and higher. Sockets passed through $LISTEN_FDS to + systemd-activate will be passed through to the daemon, in the original positions. Other sockets + specified with will use consecutive descriptors. By default, + systemd-activate listens on a stream socket, use and + to listen on datagram or sequential packet sockets instead (see below). @@ -101,9 +95,8 @@ - Launch a separate instance of daemon per - connection and pass the connection socket as standard input - and standard output. + Launch an instance of the service binary for each connection and pass the connection + socket. @@ -122,6 +115,14 @@ . + + + + Use the inetd protocol for passing file descriptors, i.e. as standard input and standard + output, instead of the new-style protocol for passing file descriptors using $LISTEN_FDS + (see above). + + @@ -179,7 +180,7 @@ Run an echo server on port 2000 - $ /usr/lib/systemd/systemd-activate -l 2000 -a cat + $ /usr/lib/systemd/systemd-activate -l 2000 --inetd -a cat -- cgit v1.2.3-54-g00ecf