From 8dcc901522080c3ca7916fe819db8f9873a471b6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 17 Jul 2023 18:28:54 +0200 Subject: [PATCH] Log execvp() failures Closes: https://github.com/cage-kiosk/cage/issues/255 --- cage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cage.c b/cage.c index bce4b651..75f06968 100644 --- a/cage.c +++ b/cage.c @@ -113,6 +113,8 @@ spawn_primary_client(struct wl_display *display, char *argv[], pid_t *pid_out, s /* Close read, we only need write in the primary client process. */ close(fd[0]); execvp(argv[0], argv); + /* execvp() returns only on failure */ + wlr_log_errno(WLR_ERROR, "Failed to spawn client"); _exit(1); } else if (pid == -1) { wlr_log_errno(WLR_ERROR, "Unable to fork");