diff options
author | Noam Preil <pleasantatk@gmail.com> | 2019-03-02 16:09:14 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-03-03 01:08:05 +0100 |
commit | 1c329f2fe6ae344b3201447a586f6c9a571d44ff (patch) | |
tree | f30a5cb6d7d8049d94630644c10a70da1e90d50b | |
parent | floating_maximum_size: change default behavior (diff) | |
download | sway-1c329f2fe6ae344b3201447a586f6c9a571d44ff.tar.gz sway-1c329f2fe6ae344b3201447a586f6c9a571d44ff.tar.zst sway-1c329f2fe6ae344b3201447a586f6c9a571d44ff.zip |
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 cb889b3e..3a36ed18 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[]) { | |||
221 | pid = fork(); | 221 | pid = fork(); |
222 | if (pid < 0) { | 222 | if (pid < 0) { |
223 | sway_log_errno(SWAY_ERROR, "fork failed"); | 223 | sway_log_errno(SWAY_ERROR, "fork failed"); |
224 | exit(EXIT_FAILURE); | 224 | _exit(EXIT_FAILURE); |
225 | } else if (pid == 0) { | 225 | } else if (pid == 0) { |
226 | if (!set_cloexec(sockets[1], false)) { | 226 | if (!set_cloexec(sockets[1], false)) { |
227 | exit(EXIT_FAILURE); | 227 | _exit(EXIT_FAILURE); |
228 | } | 228 | } |
229 | 229 | ||
230 | char wayland_socket_str[16]; | 230 | char wayland_socket_str[16]; |
@@ -234,9 +234,9 @@ static bool spawn_swaybg(struct sway_output *output, char *const cmd[]) { | |||
234 | 234 | ||
235 | execvp(cmd[0], cmd); | 235 | execvp(cmd[0], cmd); |
236 | sway_log_errno(SWAY_ERROR, "execvp failed"); | 236 | sway_log_errno(SWAY_ERROR, "execvp failed"); |
237 | exit(EXIT_FAILURE); | 237 | _exit(EXIT_FAILURE); |
238 | } | 238 | } |
239 | exit(EXIT_SUCCESS); | 239 | _exit(EXIT_SUCCESS); |
240 | } | 240 | } |
241 | 241 | ||
242 | if (close(sockets[1]) != 0) { | 242 | if (close(sockets[1]) != 0) { |