• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
link(2) allows directory hard links, man page says otherwise
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

link(2) allows directory hard links, man page says otherwise


  • Subject: link(2) allows directory hard links, man page says otherwise
  • From: Rosyna <email@hidden>
  • Date: Wed, 12 Dec 2007 16:12:59 -0700

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.


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.


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?


--- 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: link(2) allows directory hard links, man page says otherwise
      • From: "Jordan K. Hubbard" <email@hidden>
    • Re: link(2) allows directory hard links, man page says otherwise
      • From: "Mike Frysinger" <email@hidden>
  • Prev by Date: Re: getrusage only partially working?
  • Next by Date: Re: link(2) allows directory hard links, man page says otherwise
  • Previous by thread: Re: CFLite Leopard CF-476
  • Next by thread: Re: link(2) allows directory hard links, man page says otherwise
  • Index(es):
    • Date
    • Thread