• 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: determine whether an ancillary program/task can run
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determine whether an ancillary program/task can run


  • Subject: Re: determine whether an ancillary program/task can run
  • From: Martin Wierschin <email@hidden>
  • Date: Thu, 01 Sep 2011 15:24:07 -0700

>> Thanks for your reply. I was hoping to avoid handling that inspection myself, but even if I go that route there's another problem: the ancillary tool isn't a proper bundle, it's just a plain executable, so NSBundle's initializers will just return nil. That's a pity because there's even -[NSBundle preflightAndReturnError:] which sounds to be exactly what I want.
>>
>> Offhand does anyone know how to inspect the architecture(s) of a plain executable file? I've been googling for a little bit and haven't hit upon anything that works yet.
>
> Won't otool do the job for you?

Yes, as would "lipo -info" or "file", but running/parsing another tool's output just for this seems a bit silly.

In terms of functions I can call, I found "dlopen_preflight", but it seems to fail, even when I know my tool can be run via NSTask.

~Martin

_______________________________________________

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: 
 >determine whether an ancillary program/task can run (From: Martin Wierschin <email@hidden>)
 >Re: determine whether an ancillary program/task can run (From: Dave DeLong <email@hidden>)
 >Re: determine whether an ancillary program/task can run (From: Martin Wierschin <email@hidden>)
 >Re: determine whether an ancillary program/task can run (From: Philip Ershler <email@hidden>)

  • Prev by Date: Re: determine whether an ancillary program/task can run
  • Next by Date: Re: determine whether an ancillary program/task can run
  • Previous by thread: Re: determine whether an ancillary program/task can run
  • Next by thread: Re: determine whether an ancillary program/task can run
  • Index(es):
    • Date
    • Thread