From 54039c1fb44b691abe94fc412696bdc5e14d0a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 30 Oct 2019 20:21:19 +0100 Subject: [PATCH] slave: log child's errno, not parents --- slave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slave.c b/slave.c index a4ff67a1..0e762bf0 100644 --- a/slave.c +++ b/slave.c @@ -119,8 +119,8 @@ slave_spawn(int ptmx, int argc, char *const *argv, LOG_ERRNO("failed to read from pipe"); return -1; } else if (ret == sizeof(_errno)) { - LOG_ERRNO( - "%s: failed to execute", argc == 0 ? conf_shell : argv[0]); + LOG_ERRNO_P( + "%s: failed to execute", _errno, argc == 0 ? conf_shell : argv[0]); return -1; } else LOG_DBG("%s: successfully started", conf_shell);