We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88b9359 commit 3eaaaffCopy full SHA for 3eaaaff
1 file changed
src/node_stdio.cc
@@ -68,7 +68,13 @@ WriteError (const Arguments& args)
68
size_t written = 0;
69
while (written < msg.length()) {
70
r = write(STDERR_FILENO, (*msg) + written, msg.length() - written);
71
- if (r < 0) return ThrowException(errno_exception(errno));
+ if (r < 0) {
72
+ if (errno == EAGAIN || errno == EIO) {
73
+ usleep(100);
74
+ continue;
75
+ }
76
+ return ThrowException(errno_exception(errno));
77
78
written += (size_t)r;
79
}
80
0 commit comments