Skip to content

Commit

Permalink
Log execvp() failures
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Jul 17, 2023
1 parent bd5b20e commit 160979a
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 @@ -112,6 +112,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 160979a

Please sign in to comment.