Back out revision 1.19 and 1.20 until I find mental clarity to deal with

issues bde pointed out.
This commit is contained in:
Eivind Eklund 2005-06-01 20:34:06 +00:00
parent e8a296f5e5
commit e1d27f08f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146882

View File

@ -219,7 +219,13 @@ main(int argc, char *argv[])
exit(1);
}
if ((sb.st_mode & S_IFMT) == S_IFSOCK || (sb.st_mode & S_IFMT) == S_IFIFO) {
/*
* Determine if input is a pipe. 4.4BSD will set the SOCKET
* bit in the st_mode field for pipes. Fix this then.
*/
if (lseek(fileno(stdin), (off_t)0, SEEK_CUR) == -1 &&
errno == ESPIPE) {
errno = 0;
fflag = 0; /* POSIX.2 requires this. */
}