Date: Wed, 23 Feb 2011 18:54:40 GMT From: Bjartur Thorlacius <svartman95@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/154983: head returns EXIT_SUCCESS upon EOF Message-ID: <201102231854.p1NIsewk080159@red.freebsd.org> Resent-Message-ID: <201102231900.p1NJ0J1h034546@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 154983 >Category: bin >Synopsis: head returns EXIT_SUCCESS upon EOF >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 23 19:00:19 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Bjartur Thorlacius >Release: Darwin 8.11.1 >Organization: >Environment: Darwin sophie.lan 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386 >Description: $(head -n $n) returns EXIT_SUCCESS upon premature end of file. $(head -n $n) should only ever return EXIT_SUCCESS when $n lines have successfully been read to stdout. P.S. Also affects GNU head. >How-To-Repeat: echo| head -n2 && echo bug >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102231854.p1NIsewk080159>