From trost@cloud.rain.com  Mon Jul 24 09:53:02 2000
Return-Path: <trost@cloud.rain.com>
Received: from grey.cloud.rain.com (c1029014-a.bvrtn1.or.home.com [24.12.160.67])
	by hub.freebsd.org (Postfix) with ESMTP id E2A1F37B56A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 24 Jul 2000 09:52:56 -0700 (PDT)
	(envelope-from trost@cloud.rain.com)
Received: (qmail 7414 invoked by uid 236); 24 Jul 2000 16:52:56 -0000
Message-Id: <20000724165256.7413.qmail@grey.cloud.rain.com>
Date: 24 Jul 2000 16:52:56 -0000
From: trost@cloud.rain.com
Reply-To: trost@cloud.rain.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: "cmp -s" broken when reading a pipe
X-Send-Pr-Version: 3.2

>Number:         20143
>Category:       bin
>Synopsis:       "cmp -s" broken when reading a pipe
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    sheldonh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 24 10:00:01 PDT 2000
>Closed-Date:    Tue Jul 25 07:49:31 PDT 2000
>Last-Modified:  Tue Jul 25 07:50:45 PDT 2000
>Originator:     Bill Trost
>Release:        FreeBSD 4.1-RC2 i386
>Organization:
Trost Computing
>Environment:

	--

>Description:

	"cmp -s" will incorrectly report that files are different if
	one of the files is standard input.

>How-To-Repeat:

	$ date > a
	$ cmp -s a a || echo different
	$ cat a | cmp - a || echo different
	$ cat a | cmp -s - a || echo different
	different

>Fix:

	I've changed a script that uses "cmp -s" to just use "cmp" and
	redirect stdout to /dev/null.

>Release-Note:
>Audit-Trail:

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: trost@cloud.rain.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/20143: "cmp -s" broken when reading a pipe 
Date: Tue, 25 Jul 2000 14:19:50 +0200

 On 24 Jul 2000 16:52:56 GMT, trost@cloud.rain.com wrote:
 
 > 	"cmp -s" will incorrectly report that files are different if
 > 	one of the files is standard input.
 
 I think that this is because -s implies -z (not mentioned in the manual
 page).
 
 Ciao,
 Sheldon.
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Tue Jul 25 07:49:31 PDT 2000 
State-Changed-Why:  
The problem came down to a pair of missing braces in rev 1.8. 
This'll be fixed in 4.1-RELEASE.  Thanks for the report! 


Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Jul 25 07:49:31 PDT 2000 
Responsible-Changed-Why:  

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