NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/43751: ls -L is broken

>Number:         43751
>Category:       bin
>Synopsis:       ls -L returns wrong exit code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 12 18:55:00 +0000 2010
>Release:        NetBSD 5.99.37
System: NetBSD sea 5.99.37 NetBSD 5.99.37 (GENERIC) #3: Wed Jul 28 19:07:07 UTC 
2010 root@roome:/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
ls -L should return non-zero exit code if the target of a symlink does
not exist.  I think this changed within a month or so.
netbsd% ln -s /nonexistent 
netbsd% ls -L nonexistent
netbsd% echo $?
netbsd% ls /nonexistent 
ls: /nonexistent: No such file or directory

netbsd4.99% ln -s /nonexistent
netbsd4.99% ls -L !$
ls -L /nonexistent
ls: /nonexistent: No such file or directory
netbsd4.99% echo $?

solaris% ln -s /nonexistent
solaris% ls -L /nonexistent
ls: cannot access /nonexistent: No such file or directory
solaris% echo $?

Haven't looked into it yet.  Recent changes to src/bin/ls seem innocuous.


Home | Main Index | Thread Index | Old Index