• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
      • From: j o a r <email@hidden>
References: 
 >[NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger. (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
  • Next by Date: Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
  • Previous by thread: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
  • Next by thread: Re: [NSProcessInfo processInfo] environment] only can see my session's env variables via the debugger.
  • Index(es):
    • Date
    • Thread