summaryrefslogtreecommitdiff
path: root/deps/uv/test/runner-unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/test/runner-unix.c')
-rw-r--r--deps/uv/test/runner-unix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/uv/test/runner-unix.c b/deps/uv/test/runner-unix.c
index 77c68dcd6c..f6ea45e140 100644
--- a/deps/uv/test/runner-unix.c
+++ b/deps/uv/test/runner-unix.c
@@ -24,6 +24,7 @@
#include <stdint.h> /* uintptr_t */
+#include <errno.h>
#include <unistd.h> /* usleep */
#include <string.h> /* strdup */
#include <stdio.h>
@@ -146,8 +147,11 @@ static void* dowait(void* data) {
if (args->pipe[1] >= 0) {
/* Write a character to the main thread to notify it about this. */
- char c = 0;
- write(args->pipe[1], &c, 1);
+ ssize_t r;
+
+ do
+ r = write(args->pipe[1], "", 1);
+ while (r == -1 && errno == EINTR);
}
return NULL;