fanf: (Default)
[personal profile] fanf

What happens if you try to create a symlink to a zero-length target, as in ln -s "" foo?

Linux: ENOENT.

Mac OS X 10.4: EINVAL.

FreeBSD: works, and any attempt to resolve the symlink returns ENOENT.

Solaris: works, and the resulting symlink behaves the same as ln -s . foo

Date: 2008-09-15 16:46 (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
A quick strace ln -s "" zzz turns up
symlink("", "zzz")                      = -1 ENOENT (No such file or directory)
so it doesn't look as if glibc is doing anything obviously silly above the syscall level.

July 2025

S M T W T F S
  1 2345
6789101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated 2025-07-27 13:08
Powered by Dreamwidth Studios