Re: NSTask: program launching another program, potential problem with path: how to do?
Re: NSTask: program launching another program, potential problem with path: how to do?
- Subject: Re: NSTask: program launching another program, potential problem with path: how to do?
- From: Jens Alfke <email@hidden>
- Date: Thu, 10 Apr 2014 15:04:13 -0700
On Apr 10, 2014, at 2:34 PM, Colas B <email@hidden> wrote:
> I don't specify explicitly a bash when I run my program (with NSTask) : I just give the path to the program.
It sounds like the program you’re telling NSTask to run is a shell-script. You can easily verify that by using the ‘file’ command (or just by opening the file in a text editor to see if it starts with “#!”) — for example,
$ file /usr/bin/imptrace
/usr/bin/imptrace: Bourne-Again shell script text executable
And it sounds like that script is invoking some other program without a hardcoded path, and the location of that program isn’t in the current search path ($PATH environment variable.)
—Jens
_______________________________________________
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