From nobody@FreeBSD.ORG  Fri Aug  4 06:49:24 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 8858A37B5F6; Fri,  4 Aug 2000 06:49:24 -0700 (PDT)
Message-Id: <20000804134924.8858A37B5F6@hub.freebsd.org>
Date: Fri,  4 Aug 2000 06:49:24 -0700 (PDT)
From: B.Candler@pobox.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: cmp(1) -s fails when comparing a file to stdin
X-Send-Pr-Version: www-1.0

>Number:         20397
>Category:       bin
>Synopsis:       cmp(1) -s fails when comparing a file to stdin
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 04 06:50:00 PDT 2000
>Closed-Date:    Mon Aug 7 01:46:06 PDT 2000
>Last-Modified:  Mon Aug 07 01:46:20 PDT 2000
>Originator:     Brian Candler
>Release:        4.0-20000718-STABLE
>Organization:
>Environment:
FreeBSD bloodhound.uk.worldonline.com 4.0-20000718-STABLE FreeBSD 4.0-20000718-STABLE #0: Thu Jul 20 15:13:20 BST 2000     root@bloodhound.uk.worldonline.com:/usr/src/sys/compile/BLOODHOUND  i386

>Description:
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

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Aug 7 01:46:06 PDT 2000 
State-Changed-Why:  
Duplicate of bin/20143. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20397 
>Unformatted:
