summaryrefslogtreecommitdiff
path: root/src/anet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anet.c')
-rw-r--r--src/anet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/anet.c b/src/anet.c
index 00c30b83d..790ea7e0a 100644
--- a/src/anet.c
+++ b/src/anet.c
@@ -697,3 +697,9 @@ int anetSetSockMarkId(char *err, int fd, uint32_t id) {
return ANET_OK;
#endif
}
+
+int anetIsFifo(char *filepath) {
+ struct stat sb;
+ if (stat(filepath, &sb) == -1) return 0;
+ return S_ISFIFO(sb.st_mode);
+}