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
>Originator: heas%sea.shrubbery.net@localhost
>Release: NetBSD 5.99.37
>Organization:
>Environment:
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
>Description:
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.
>How-To-Repeat:
netbsd% ln -s /nonexistent
netbsd% ls -L nonexistent
nonexistent
netbsd% echo $?
0
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 $?
1
solaris% ln -s /nonexistent
solaris% ls -L /nonexistent
ls: cannot access /nonexistent: No such file or directory
solaris% echo $?
2
>Fix:
Haven't looked into it yet. Recent changes to src/bin/ls seem innocuous.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index