Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  4 Aug 2000 06:49:24 -0700 (PDT)
From:      B.Candler@pobox.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/20397: cmp(1) -s fails when comparing a file to stdin
Message-ID:  <20000804134924.8858A37B5F6@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 04 06:50:00 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000804134924.8858A37B5F6>