Log execvp() failures

Closes: https://github.com/cage-kiosk/cage/issues/255
This commit is contained in:
Simon Ser 2023-07-17 18:28:54 +02:00
parent b1129ca72e
commit 8dcc901522

2
cage.c
View file

@ -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");