aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2019-08-06 14:28:52 +0100
committersin <sin@2f30.org>2019-08-07 08:18:54 +0100
commit784551aa55ff996e103443d1bbe65684fd4d7463 (patch)
tree987deb8b01017951aa9e72c377b682afb4880545
parentc19a624e3b5346da6fa6dbc7c4eb44a4d2a2fdce (diff)
downloadnoice-784551aa55ff996e103443d1bbe65684fd4d7463.tar.gz
Explicitly ignore interruptions in spawnvp()
-rw-r--r--spawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/spawn.c b/spawn.c
index 5f63cb9..01b78cb 100644
--- a/spawn.c
+++ b/spawn.c
@@ -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)
;
}
}
Un proyecto texto-plano.xyz