From ded0e56eb088873c2c05589ae9ab095a573450eb Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 5 Dec 2021 00:23:20 +0000 Subject: s6-socklog: also ensure stderr is open Signed-off-by: Laurent Bercot --- src/daemontools-extras/s6-socklog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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() ; -- cgit v1.2.3