Re: link(2) allows directory hard links, man page says otherwise
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com - Jordan On Dec 12, 2007, at 3:12 PM, Rosyna wrote: The man page for link(2) says (in various places): As mandated by POSIX.1, path1 may not be a directory. [EPERM] The file named by path1 is a directory. --- Sincerely, Rosyna Keller Technical Support/Carbon troll/Always needs a hug Unsanity: Unsane Tools for Insanely Great People It's either this, or imagining Phil Schiller in a thong. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/jkh%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... You're not supposed to notice that directory hard links are now allowed (for Time Machine's exclusive use) so it's neither an error in the documentation or an error in the function. The error is that you're being too nosy. :-) The actual implementation of link() on 10.5 allows for directory hard links on HFS+ as long as they follow these rules: - Source parent and destination parent cannot match - A link is not permitted in the root directory - Parent of 'pointed at' directory is not the root directory - The 'pointed at' directory (source) is not an ancestor of the new directory hard link (destination). - No ancestor of the new directory hard link (destination) is a directory hard link. STANDARDS The link() function is expected to conform to IEEE Std 1003.1-1988 (``POSIX.1''). But actually calling link() allows for directory hard links. Is this an error in the documentation, an error in the function, or am I connecting two things that shouldn't be? This email sent to jkh@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Jordan K. Hubbard