Re: sysctl.proc_exec_affinity to force launching of 32-bit flavor?
Re: sysctl.proc_exec_affinity to force launching of 32-bit flavor?
- Subject: Re: sysctl.proc_exec_affinity to force launching of 32-bit flavor?
- From: Eric Gouriou <email@hidden>
- Date: Wed, 11 Mar 2009 23:53:03 -0700
On Mar 11, 2009, at 11:36 PM, Jim Correia wrote:
Suppose I have a binary built with ppc, i386 and x86_64 architectures.
Also suppose that on a particular OS release, I want to ensure that
when I exec that binary, the i386 variant runs, not the x86_64.
For bundled applications, I can influence this through the LS keys.
Before I exec the tool, I've tried setting sysctl.proc_exec_affinity
to CPU_TYPE_X86 but the 64-bit version is executed. (Setting the
affinity to ppc seems to work.)
Am I overlooking something?
I don't know about the sysctl and hope others will directly address
your question.
I know that posix_spawn() and posix_spawnattr_setbinpref_np() are
frequently recommended
in such cases. Launchd also has the BinaryOrderPreference key that is
helpful in similar situations.
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden