Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
- Subject: Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
- From: Chris Parker <email@hidden>
- Date: Fri, 12 May 2006 10:17:37 -0700
On May 12, 2006, at 10:13 AM, Frederick C. Lee wrote:
I would like to view all my environment values that I have set in
my .tcshrc or .bashrc, etc. signon files.
I currently use the tcsh.
The following is what I used:
myEnvironment = [[[NSProcessInfo processInfo] environment] retain];
But 'environment' only contains a few items, probably globally set
in /etc area.
I can ONLY view all the environment variables when I'm in the
debugger.
So my question is, how can I collect all the environment variables
that I had set within my shell's signon file(s)?
When the Finder (really LaunchServices, but close enough) launches
your process, it does not source any of your shell initialization/
login/configuration files.
If you invoked gdb from the command line, and then launched your app,
you're getting your shell environment because you started from the
shell.
Xcode allows you to set the environment, but I don't believe it does
anything with the environment variables either, unless you set them in
the "Executable" section of the project, and even then it'll only pick
up the ones you set explicitly there.
.chris
--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.
_______________________________________________
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