• 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: [NSTask] -launch return
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSTask] -launch return


  • Subject: Re: [NSTask] -launch return
  • From: Erg Consultant <email@hidden>
  • Date: Tue, 9 Jun 2009 20:16:51 -0700 (PDT)

I find it absolutely appalling on a modern OS that I should have to write a 3rd PPC process and launch it just to get the API to behave as documented.

Erg




________________________________
From: Greg Guerin <email@hidden>
To: list-cocoa-dev <email@hidden>
Sent: Tuesday, June 9, 2009 8:09:09 PM
Subject: Re: [NSTask] -launch return

Erg Consultant wrote:

> The Rosetta startup delay is significant because my PPC-only child can't run until Rosetta is running - and it appears to not be running until the 1st PPC program since reboot has been run.

Launch a dummy child process that only contains ppc code, then wait for that process to exit.  The dummy simply does exit(0).  This ensures that Rosetta is running if it's on an Intel CPU, or it will have simply burned a fork/exec on a PPC CPU.  Either way, you should then be able to launch further executables with little or no delay.  "Priming the pump", so to speak.

You may not even need to write any dummy code on 10.5+.  The /usr/bin/arch command can select a specific architecture (ppc in this case), and the /usr/bin/true command already performs an exit(0).  E.g.:

  /usr/bin/arch -ppc /usr/bin/true

There may be other ways to improve this beyond BF&I, such as testing the non-dummy executable before launching it, to see whether it even needs the dummy to load Rosetta first.

  -- GG

_______________________________________________

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

  • Follow-Ups:
    • Re: [NSTask] -launch return
      • From: M Pulis <email@hidden>
    • Re: [NSTask] -launch return
      • From: Quincey Morris <email@hidden>
References: 
 >Re: [NSTask] -launch return (From: Greg Guerin <email@hidden>)

  • Prev by Date: Re: [NSTask] -launch return
  • Next by Date: Re: [NSTask] -launch return
  • Previous by thread: Re: [NSTask] -launch return
  • Next by thread: Re: [NSTask] -launch return
  • Index(es):
    • Date
    • Thread