summaryrefslogtreecommitdiff
path: root/src/node_stdio.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_stdio.cc')
-rw-r--r--src/node_stdio.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/node_stdio.cc b/src/node_stdio.cc
index c13ff508d..5e09a8449 100644
--- a/src/node_stdio.cc
+++ b/src/node_stdio.cc
@@ -163,9 +163,7 @@ static bool IsBlocking(int fd) {
perror("fstat");
return true;
}
- if (s.st_mode & S_IFSOCK == S_IFSOCK) return false;
- if (s.st_mode & S_IFIFO == S_IFIFO) return false;
- return true;
+ return !S_ISSOCK(s.st_mode) && !S_ISFIFO(s.st_mode);
}