GNU bug report logs -
#17075
diff - - exits immediately
Previous Next
Reported by: karl <at> freefriends.org (Karl Berry)
Date: Sun, 23 Mar 2014 21:22:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Karl Berry wrote:
> Couldn't there be side effects missed by not reading the input?
Sure, but the invoker shouldn't rely on those side effects, from 'diff'
or from 'cmp' or from 'head' or from any other program that need not
read all its input.
> Perhaps the help message could get a one-line addition:
Unfortunately all the one-liners I can think of are wrong. For example,
diff must read all its input even when given two identical file names A
and A, e.g., if it's also given the -DFOO option. And even without
-DFOO, 'diff A A' reports an error if A does not exist.
Another amusing example: 'diff A A' can succeed even if A is unreadable:
$ umask 777
$ echo foo >A
$ ls -l A
---------- 1 eggert eggert 4 Mar 24 17:02 A
$ diff A A
$ echo $?
0
This bug report was last modified 11 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.