From owner-freebsd-bugs Mon Jul 24 10: 0: 9 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id AAB1137B6AF for ; Mon, 24 Jul 2000 10:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id KAA66888; Mon, 24 Jul 2000 10:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) 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 ; 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 X-Send-Pr-Version: 3.2 Subject: bin/20143: "cmp -s" broken when reading a pipe Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20143 >Category: bin >Synopsis: "cmp -s" broken when reading a pipe >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 24 10:00:01 PDT 2000 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message