Skip to content

Commit 3eaaaff

Browse files
committed
Ignore EAGAIN in stderr dumps.
(Going out of the way to be sync)
1 parent 88b9359 commit 3eaaaff

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/node_stdio.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ WriteError (const Arguments& args)
6868
size_t written = 0;
6969
while (written < msg.length()) {
7070
r = write(STDERR_FILENO, (*msg) + written, msg.length() - written);
71-
if (r < 0) return ThrowException(errno_exception(errno));
71+
if (r < 0) {
72+
if (errno == EAGAIN || errno == EIO) {
73+
usleep(100);
74+
continue;
75+
}
76+
return ThrowException(errno_exception(errno));
77+
}
7278
written += (size_t)r;
7379
}
7480

0 commit comments

Comments
 (0)