. 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:
Ben Gras
2006-02-02 16:59:07 +00:00
parent 17f48fc972
commit a3bda44a41
3 changed files with 6 additions and 3 deletions

View File

@@ -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;
}