3 ms·link() doesn't work for this use case. You need linkat() with the AT_SYMLINK_FOLLOW flag enabled.by jwilk 7y agolink() doesn't work for this use case. You need linkat() with the AT_SYMLINK_FOLLOW flag enabled.