#12390: [cmp] fails to find difference
-----------------------------------------------+---------------------------
Reporter: ttcoder | Owner: nobody
Type: bug | Status: closed
Priority: high | Milestone: R1/beta1
Component: Applications/Command Line Tools | Version:
Resolution: invalid | R1/Development
Blocked By: | Keywords:
Has a Patch: 0 | Blocking:
| Platform: All
-----------------------------------------------+---------------------------
Comment (by korli):
This isn't exactly a bug in cmp, more in Haiku: to find out if the output
is redirected to /dev/null, cmp probes whether the stat structure are
somehow identical. The two file descriptors are character devices and have
st_rdev set to -1.
If cmp finds out stdout is /dev/null, then it spares the job of computing
diffs, and outputs nothing.
Filling st_rdev for character and block devices would effectively fix this
bug.
--
Ticket URL: <https://dev.haiku-os.org/ticket/12390#comment:3>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.