Skip to content

Commit

Permalink
Log execvp() failures
Browse files Browse the repository at this point in the history
Closes: #255
  • Loading branch information
emersion committed Jul 28, 2023
1 parent b1129ca commit 8dcc901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8dcc901

Please sign in to comment.