• 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: cross-process file open notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross-process file open notifications


  • Subject: Re: cross-process file open notifications
  • From: Alexander Cohen <email@hidden>
  • Date: Wed, 3 Feb 2010 19:56:18 -0500

I can't put any code into the dylib. It's library that's not being developed anymore but many users have it and use it. We have a new approach but the dylib has a sort of lock on some things we need. Because of this, we've decided to watch for usage of this dylib and when there is no usage, we can enable our new approach. As of now, all i can do is poll for new processes and run lsof on the to see what files they are using. I consider this approach very bad but i can't think of anything better.

AC

On Feb 3, 2010, at 5:28 PM, Jens Alfke wrote:

>
> On Feb 3, 2010, at 1:50 PM, Alexander Cohen wrote:
>
>> Is there any way in cocoa to get some sort of notifications when any process opens or closes any file?
>
> I'm pretty sure there isn't. The rate at which those notifications were sent would be pretty horrific (ever run fs_usage on all processes?) Even the private file notification firehose that's consumed by Spotlight only tracks modifications, not opening.
>
>> The reason i need this is because i need to watch the system and do a certain task every time a particular dylib is loaded by an application.
>
> Can you put code into the dylib itself that will do this? Like a +load method?
>
>
> On Feb 3, 2010, at 1:57 PM, Dave Carrigan wrote:
>
>>> The FSEvents API is most likely what you're looking for.
>> Come to think of it, FSEvents might not tell you about files being opened, so it might not be exactly what you want, after all.
>
> No, FSEvents notifies you when a particular directory (or anything inside it) changes.
>
> —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

_______________________________________________

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

References: 
 >cross-process file open notifications (From: Alexander Cohen <email@hidden>)
 >Re: cross-process file open notifications (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Synthesize NSMutableString retain count question
  • Next by Date: Re: cross-process file open notifications
  • Previous by thread: Re: cross-process file open notifications
  • Next by thread: Re: cross-process file open notifications
  • Index(es):
    • Date
    • Thread