• 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
Re: file locking: fcntl vs. flock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file locking: fcntl vs. flock


  • Subject: Re: file locking: fcntl vs. flock
  • From: George K Colley <email@hidden>
  • Date: Sun, 31 Aug 2008 17:00:33 -0700

In Leopard both AFP and SMB support carbon mandatory locking. SMB supports carbon mandatory locking and flocks, AFP only supports carbon mandatory locking.

George
On Aug 31, 2008, at 1:12 PM, William Andrew Burnson wrote:

Hello,

I'm debugging someone's multiple instance preventer on Mac OS X Leopard. It operates using a file-based lock, using fcntl. However we found that this did not work in a networked environment with SMB filesystems because it returned errno 45 ENOTSUP (Operation not supported). Admin and local accounts performed the lock, but for a networked user, it failed. In a previous version, the code used flock, which does work, but apparently that isn't a general solution either because it doesn't do anything for AFP shares.

Does anyone know what a good solution would be for creating a file- based interprocess lock?
_______________________________________________
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

_______________________________________________ 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
References: 
 >file locking: fcntl vs. flock (From: William Andrew Burnson <email@hidden>)

  • Prev by Date: file locking: fcntl vs. flock
  • Previous by thread: file locking: fcntl vs. flock
  • Index(es):
    • Date
    • Thread