How to get a file descriptor for a symlink?
How to get a file descriptor for a symlink?
- Subject: How to get a file descriptor for a symlink?
- From: "Trainor, Chris" <email@hidden>
- Date: Mon, 27 Oct 2008 14:58:18 -0400
- Thread-topic: How to get a file descriptor for a symlink?
I am trying to call the open() function on a symlink to get
a file descriptor. I need to open the symlink file, not the target.
I can use the O_SYMLINK flag on Leopard to get this behavior, but that flag is
not available on Tiger. I initially thought O_NOFOLLOW would do what I wanted,
but then realized that is not what it is meant to do. It is supposed to
cause the open() call to fail if the file is a symlink. It behaves this
way on Leopard, but it appears to be broken on Tiger. Calling open() on
Tiger seems to just ignore the O_ NOFOLLOW flag.
Any suggestions?
Thanks
The information contained in this email message and its attachments is intended
only for the private and confidential use of the recipient(s) named above, unless the sender expressly agrees otherwise. Transmission of email over the Internet
is not a secure communications medium. If you are requesting or have requested
the transmittal of personal data, as defined in applicable privacy laws by means
of email or in an attachment to email you must select a more secure alternate means of transmittal that supports your obligations to protect such personal data. If the reader of this message is not the intended recipient and/or you have received this email in error, you must take no action based on the information in this email and you are hereby notified that any dissemination, misuse, copying, or disclosure of this communication is strictly prohibited. If you have received
this communication in error, please notify us immediately by email and delete the original message.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden