summaryrefslogtreecommitdiff
path: root/src/daemontools-extras/s6-socklog.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-12-05 00:23:20 +0000
committerLaurent Bercot <ska@appnovation.com>2021-12-05 00:23:20 +0000
commitded0e56eb088873c2c05589ae9ab095a573450eb (patch)
treeb2e6ae70258cbc19fa7056d22ab6d8f001f91676 /src/daemontools-extras/s6-socklog.c
parente3b7cbc8648c098f1ad372251a1d2ec775ff135d (diff)
downloads6-ded0e56eb088873c2c05589ae9ab095a573450eb.tar.xz
s6-socklog: also ensure stderr is open
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/daemontools-extras/s6-socklog.c')
-rw-r--r--src/daemontools-extras/s6-socklog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/daemontools-extras/s6-socklog.c b/src/daemontools-extras/s6-socklog.c
index 0bef036..8781a56 100644
--- a/src/daemontools-extras/s6-socklog.c
+++ b/src/daemontools-extras/s6-socklog.c
@@ -114,7 +114,8 @@ int main (int argc, char const *const *argv)
}
close(0) ;
- if (fcntl(1, F_GETFD) < 0) strerr_dief1sys(100, "invalid stdout") ;
+ if (fcntl(1, F_GETFD) < 0) strerr_dief2sys(100, "invalid std", "out") ;
+ if (fcntl(2, F_GETFD) < 0) strerr_dief2sys(100, "invalid std", "err") ;
if (usock)
{
x[2].fd = ipc_datagram_nbcoe() ;