[BusyBox 0006274]: head does not exit with exitcode of 1 when file not found (mismatch with coreutils)

bugs at busybox.net bugs at busybox.net
Wed Nov 12 22:16:56 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=6274 
====================================================================== 
Reported By:                pgbovine
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   6274
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             11-11-2008 13:41 PST
Last Modified:              11-12-2008 14:16 PST
====================================================================== 
Summary:                    head does not exit with exitcode of 1 when file not
found (mismatch with coreutils)
Description: 
head is supposed to exit with exitcode of 1 (or at least non-zero) when
there is an error.

Coreutils:
$ head ''
head: cannot open `' for reading: No such file or directory
$ echo $?
1

(proper exitcode of 1 for error)

Busybox:
$ ./busybox head ''
head: : No such file or directory
$ echo $?
0

(error message printed but still exits with 0 to signify success)
====================================================================== 

---------------------------------------------------------------------- 
 vda - 11-11-08 14:43  
---------------------------------------------------------------------- 
Please try attached a.patch 

---------------------------------------------------------------------- 
 vda - 11-12-08 14:16  
---------------------------------------------------------------------- 
Fixed in svn. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-11-08 13:41  pgbovine       New Issue                                    
11-11-08 13:41  pgbovine       Status                   new => assigned     
11-11-08 13:41  pgbovine       Assigned To               => BusyBox         
11-11-08 14:43  vda            File Added: a.patch                          
11-11-08 14:43  vda            Note Added: 0015484                          
11-12-08 14:16  vda            Status                   assigned => closed  
11-12-08 14:16  vda            Note Added: 0015604                          
======================================================================




More information about the busybox-cvs mailing list