Skip to content

Commit

Permalink
Fixes crash in spawn_swaybg (closes #3733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noam Preil authored and emersion committed Mar 3, 2019
1 parent 4303595 commit 1c329f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sway/config/output.c
Expand Up @@ -221,10 +221,10 @@ static bool spawn_swaybg(struct sway_output *output, char *const cmd[]) {
pid = fork();
if (pid < 0) {
sway_log_errno(SWAY_ERROR, "fork failed");
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
} else if (pid == 0) {
if (!set_cloexec(sockets[1], false)) {
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
}

char wayland_socket_str[16];
Expand All @@ -234,9 +234,9 @@ static bool spawn_swaybg(struct sway_output *output, char *const cmd[]) {

execvp(cmd[0], cmd);
sway_log_errno(SWAY_ERROR, "execvp failed");
exit(EXIT_FAILURE);
_exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
_exit(EXIT_SUCCESS);
}

if (close(sockets[1]) != 0) {
Expand Down

0 comments on commit 1c329f2

Please sign in to comment.