Does any operating system provide a mechanism (system call - not command line program) to change the pathname referenced by a symbolic link (symlink) - other than by unlinking the old one and creating a new one?
The POSIX standard does not. Solaris 10 does not. MacOS X 10.5 (Leopard) does not.
Is there anything that does?
(I'm expecting that the answer is "No".)
Since proving a negative is hard, let's reorganize the question.
If you know that some (Unix-like) operating system not already listed has no system call for rewriting the value of a symlink (the string returned by readlink()
) without removing the old symlink and creating a new one, please add it - or them - in an answer. Since that means there probably won't be a single 'acceptable' answer, I'm converting to Community Wiki.