diff options
author | Noam Preil <pleasantatk@gmail.com> | 2019-03-02 16:09:14 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-04 12:50:47 -0500 |
commit | 4c2d36d7300a9fdc344b565a6bda142914ea9080 (patch) | |
tree | 2ab922985675a39fa2097bbfa731d0ec61745841 | |
parent | a3b9f2dcfa649d9141f7bbb39e5eb951560eef72 (diff) | |
download | sway-4c2d36d7300a9fdc344b565a6bda142914ea9080.zip sway-4c2d36d7300a9fdc344b565a6bda142914ea9080.tar.gz sway-4c2d36d7300a9fdc344b565a6bda142914ea9080.tar.bz2 |
Fixes crash in spawn_swaybg (closes #3733)
-rw-r--r-- | sway/config/output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index cb889b3..3a36ed1 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -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]; @@ -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) { |