Re: To find if a binary is being used/running
Re: To find if a binary is being used/running
- Subject: Re: To find if a binary is being used/running
- From: Kyle Sluder <email@hidden>
- Date: Fri, 04 Oct 2013 00:24:43 -0700
> On Oct 4, 2013, at 12:08 AM, Nick Rogers <email@hidden> wrote:
>
> Hi,
>
> I need to know if a binary is executing or not. I just have the path to the binary e.g. /Applications/MyApp.app/Contents/MacOS/MyApp
From the OS’s point of view, your question is ill-formed. The user can create a hardlink to the same inode at /tmp/someapp and execute that.
> Is this even possible?
I can think of a couple strategies:
1. Have the target app create a resource that goes away when the app terminates. Maybe a pipe? Something that the system will destroy when the helper app terminates.
2. Move your helper apps to XPC services. (Almost certainly Apple’s preferred approach.)
--Kyle Sluder
_______________________________________________
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