=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/grep/binary.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- src/usr.bin/grep/binary.c 2004/05/06 19:42:16 1.11 +++ src/usr.bin/grep/binary.c 2004/05/06 20:18:51 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: binary.c,v 1.11 2004/05/06 19:42:16 millert Exp $ */ +/* $OpenBSD: binary.c,v 1.12 2004/05/06 20:18:51 otto Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -41,7 +41,7 @@ int i, m; int ret = 0; - if (fseek(f, 0L, SEEK_SET) == -1) + if (isatty(fileno(f)) || fseek(f, 0L, SEEK_SET) == -1) return 0; if ((m = (int)fread(buf, 1, BUFSIZ, f)) == 0)