• 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: Notification of file system modification arrives too early?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification of file system modification arrives too early?


  • Subject: Re: Notification of file system modification arrives too early?
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 30 May 2010 09:51:44 -0700

On May 30, 2010, at 7:57 AM, James Bucanek wrote:

> When a change occurs, I attempt to open the file using the FS API specifying exclusive read + exclusive write access. If it fails, it's likely because some other process still has the file open. I delay a half second or so and try again.

That sounds like a good approach, but it’s not 100% reliable. If the creating process opened the file without requesting an exclusive lock, then your open call will succeed even though the file is still open.

Unfortunately you probably can’t do any better than that, since there’s no cheap way to find out if another process has the file open.

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Notification of file system modification arrives too early?
      • From: James Bucanek <email@hidden>
    • Re: Notification of file system modification arrives too early?
      • From: Dave Keck <email@hidden>
    • Re: Notification of file system modification arrives too early?
      • From: Antonio Nunes <email@hidden>
References: 
 >Re: Notification of file system modification arrives too early? (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: UTI strings
  • Next by Date: Re: UTI strings
  • Previous by thread: Re: Notification of file system modification arrives too early?
  • Next by thread: Re: Notification of file system modification arrives too early?
  • Index(es):
    • Date
    • Thread