diff options
author | sin <sin@2f30.org> | 2019-08-06 14:28:52 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2019-08-07 08:18:54 +0100 |
commit | 784551aa55ff996e103443d1bbe65684fd4d7463 (patch) | |
tree | 987deb8b01017951aa9e72c377b682afb4880545 | |
parent | c19a624e3b5346da6fa6dbc7c4eb44a4d2a2fdce (diff) | |
download | noice-784551aa55ff996e103443d1bbe65684fd4d7463.tar.gz |
Explicitly ignore interruptions in spawnvp()
-rw-r--r-- | spawn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,6 +3,7 @@ #include <sys/wait.h> #include <err.h> +#include <errno.h> #include <stdarg.h> #include <unistd.h> @@ -24,8 +25,7 @@ spawnvp(char *dir, char *file, char *argv[]) execvp(file, argv); _exit(1); default: - /* Ignore interruptions */ - while (waitpid(pid, &status, 0) == -1) + while (waitpid(pid, &status, 0) == -1 && errno == EINTR) ; } } |