You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
readlink: Behaviour differs from GNU Coreutils when path exists but cannot be read #6688
Activate canonicalize mode. If any component of the file name except the last one is missing or unavailable, readlink produces no output and exits with a nonzero exit code. A trailing slash is ignored.
Aren't all the components of the file name /proc/1/exe except the last one present and available?
I think that GNU won't exit immediately when it encounter an error on processing the filename. Instead, it will try to process the next filename. Finally, GNU may exit with nonzero code if any of the previous processing is failed.
If you think my idea is correct, I think I can help you fix this issue.
Activity
samueltardieu commentedon Sep 14, 2024
I wonder whether GNU
readlink -f /proc/1/exe /etc/hostsdisplaying only/etc/hostsis right. The description for-fon https://www.gnu.org/software/coreutils/manual/html_node/readlink-invocation.html#readlink-invocation is:Aren't all the components of the file name
/proc/1/exeexcept the last one present and available?zgzhong commentedon Nov 24, 2024
@samueltardieu Yes, I tried to show
/procandproc/1on my machine, both permission of/procand/proc/1are555.Even though I tried to read a non-exist file along with
/etc/hosts, GNU readlink also only displaying/etc/hosts.I think that GNU won't exit immediately when it encounter an error on processing the filename. Instead, it will try to process the next filename. Finally, GNU may exit with nonzero code if any of the previous processing is failed.
If you think my idea is correct, I think I can help you fix this issue.
readlink: keep going after an operand that cannot be read
readlink: keep going after an operand that cannot be read