diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-09-10 14:59:21 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-09-10 14:59:21 +0000 |
commit | 71a5105be32cae6c1f7908f72d3562c3e9cc9ede (patch) | |
tree | 3fea34f9b7d31b9559e5e73856686f86fdc63ffd | |
parent | da4000da5e0253b10d59fdc04baafdadd43ca4fd (diff) | |
download | s6-71a5105be32cae6c1f7908f72d3562c3e9cc9ede.tar.xz |
Add guard-rail to s6-ipcserver to avoid it choking on a dgram socket
-rw-r--r-- | doc/s6-ipcserver-socketbinder.html | 1 | ||||
-rw-r--r-- | src/conn-tools/s6-ipcserver.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/s6-ipcserver-socketbinder.html b/doc/s6-ipcserver-socketbinder.html index 9bfaec5..9bf6a19 100644 --- a/doc/s6-ipcserver-socketbinder.html +++ b/doc/s6-ipcserver-socketbinder.html @@ -64,6 +64,7 @@ s6-ipcserver-socketbinder along with <tt>-m</tt>. </li> <h2> Notes </h2> <ul> + <li> The socket is provided <strong>non-blocking</strong>. </li> <li> 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 diff --git a/src/conn-tools/s6-ipcserver.c b/src/conn-tools/s6-ipcserver.c index ccc76f6..96f10c7 100644 --- a/src/conn-tools/s6-ipcserver.c +++ b/src/conn-tools/s6-ipcserver.c @@ -65,6 +65,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (!flagreuse) newargv[m++] = "-D" ; if (backlog != (unsigned int)-1) { + if (!backlog) backlog = 1 ; newargv[m++] = "-b" ; newargv[m++] = fmt + pos ; pos += uint_fmt(fmt + pos, backlog) ; |