Re: Re: Can't exec from a Cocoa app?
Re: Re: Can't exec from a Cocoa app?
- Subject: Re: Re: Can't exec from a Cocoa app?
- From: "Tom Harrington" <email@hidden>
- Date: Wed, 23 Aug 2006 17:47:38 -0600
On 8/23/06, Andrew Farmer <email@hidden> wrote:
On 23 Aug 06, at 15:46, Tom Harrington wrote:
> I have an app which at some point wants to call execle(). However the
> call fails, returning -1 with errno set to ENOTSUP, "Operation not
> supported"...if I copy and paste the execle() call into
> a plain old C command-line app (a basic sanity check done since "man
> execle" doesn't even allow that ENOTSUP can happen), it works exactly
> as I'd expect.
That shouldn't happen. What does the call look like?
execle("/Users/Shared/builds/Debug/Foo.app/Contents/MacOS/Foo",
"/Users/Shared/builds/Debug/Foo.app/Contents/MacOS/Foo", NULL, NULL);
Obviously I wouldn't hard-code the paths for release, but I'm at
sanity-check-level testing at this point so I wanted to keep it nice
and simple.
> So... something about running as a Cocoa app makes
> this not work? Is there something extra I need to do to make it work
> from my Cocoa app?
There shouldn't be. The one thing worth considering is that a Cocoa
program's working directory and $PATH may not be what you expect them
to be - cwd is usually / and $PATH is something really minimal.
Yeah, however I'm not relying on PATH, so that shouldn't matter.
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden