Re: Setting env vars from Cocoa with /bin/sh?
Re: Setting env vars from Cocoa with /bin/sh?
- Subject: Re: Setting env vars from Cocoa with /bin/sh?
- From: "David Piasecki" <email@hidden>
- Date: Thu, 8 Apr 2004 18:11:22 -0700
I figured out how to set my environment variables from the terminal
window with /bin/sh, but it doesn't seem to accept the same commands
from my Cocoa program.
I'm trying to do VAR=/Path/To/Whatever
Any ideas how to do this from the confines of Cocoa and Objective-C/C++?
David
On Apr 8, 2004, at 5:35 PM, David Piasecki wrote:
I'm using the system(char *cmd) call to execute commands from within
my application; however, I need certain environment variables set. The
shell that runs is /bin/sh, which lacks all my environment variable
settings I have with tcsh and bash. I've only ever set env variables
with tcsh or bash or other shells that use setenv or export. These
commands are shell-specific and unavailable to /bin/sh. There must be
a way of setting an environment variable with /bin/sh. Does anyone
know?
David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.