. use proper S_ISFIFO for ISFIFO check
. ignore ESPIPE error from lseek() in fflush() on read streams (because fifo's aren't detected when stdin, stdout or stderr)
This commit is contained in:
@@ -87,7 +87,7 @@ freopen(const char *name, const char *mode, FILE *stream)
|
||||
}
|
||||
|
||||
if ( fstat( fd, &st ) == 0 ) {
|
||||
if ( st.st_mode & S_IFIFO ) flags |= _IOFIFO;
|
||||
if ( S_ISFIFO(st.st_mode) ) flags |= _IOFIFO;
|
||||
} else {
|
||||
goto loser;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user