Bug 20397

Summary: cmp(1) -s fails when comparing a file to stdin
Product: Base System Reporter: Brian Candler <B.Candler>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Brian Candler 2000-08-04 14:50:00 UTC
cmp gives an exit status of 1 when comparing two identical files, in
the case where one is given on stdin (-) and the -s flag is also given.

(Aside: this breaks 'make check' for courier-imap)

How-To-Repeat: $ cmp -s /etc/passwd /etc/passwd
$ echo $?
0
$ cat /etc/passwd | cmp - /etc/passwd
$ echo $?
0
$ cat /etc/passwd | cmp -s - /etc/passwd
$ echo $?
1
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-07 09:46:06 UTC
State Changed
From-To: open->closed

Duplicate of bin/20143.