From 4e8cd2a5ce1630833a8fdd4ee4f4b0f5863aafbf Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 19 Dec 2014 00:17:59 +0000 Subject: Don't make UCSPI servers die if they can't write to stdout --- src/conn-tools/s6-ipcserver.c | 2 +- src/conn-tools/s6-tcpserver4.c | 2 +- src/conn-tools/s6-tcpserver6.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/conn-tools') diff --git a/src/conn-tools/s6-ipcserver.c b/src/conn-tools/s6-ipcserver.c index 5ff85c8..99c12a0 100644 --- a/src/conn-tools/s6-ipcserver.c +++ b/src/conn-tools/s6-ipcserver.c @@ -389,7 +389,7 @@ int main (int argc, char const *const *argv, char const *const *envp) char s[n+1] ; byte_copy(s, n, argv[0]) ; s[n++] = '\n' ; - if (allwrite(1, s, n) < n) strerr_diefu1sys(111, "write to stdout") ; + allwrite(1, s, n) ; fd_close(1) ; } fmtlocalmaxconn[1+uint_fmt(fmtlocalmaxconn+1, localmaxconn)] = 0 ; diff --git a/src/conn-tools/s6-tcpserver4.c b/src/conn-tools/s6-tcpserver4.c index 6864f00..5bb7c77 100644 --- a/src/conn-tools/s6-tcpserver4.c +++ b/src/conn-tools/s6-tcpserver4.c @@ -361,7 +361,7 @@ int main (int argc, char const *const *argv, char const *const *envp) char fmt[UINT16_FMT] ; unsigned int n = uint16_fmt(fmt, port) ; fmt[n++] = '\n' ; - if (allwrite(1, fmt, n) < n) strerr_diefu1sys(111, "write to stdout") ; + allwrite(1, fmt, n) ; fd_close(1) ; } fmtlocalmaxconn[1+uint_fmt(fmtlocalmaxconn+1, localmaxconn)] = 0 ; diff --git a/src/conn-tools/s6-tcpserver6.c b/src/conn-tools/s6-tcpserver6.c index 624bc99..cbfbf2a 100644 --- a/src/conn-tools/s6-tcpserver6.c +++ b/src/conn-tools/s6-tcpserver6.c @@ -361,7 +361,7 @@ int main (int argc, char const *const *argv, char const *const *envp) char fmt[UINT16_FMT] ; unsigned int n = uint16_fmt(fmt, port) ; fmt[n++] = '\n' ; - if (allwrite(1, fmt, n) < n) strerr_diefu1sys(111, "write to stdout") ; + allwrite(1, fmt, n) ; fd_close(1) ; } fmtlocalmaxconn[1+uint_fmt(fmtlocalmaxconn+1, localmaxconn)] = 0 ; -- cgit v1.2.3