• 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 13:38:26 -0700


On May 12, 2006, at 11:30 AM, Frederick C. Lee wrote:

I can see that either:
1) I must explicitly set my LaunchServices environment or
2) Launch a NSTask to check the User's shell environment.

Here's my target scenario:

I want to access an Oracle instance that is dependent on Oracle environment variables such as
ORACLE_BASE, ORACLE_HOME and ORACLE_SID.


I have an Oracle DB (10g) session running on my OS X.
Eventually I want to be able to have a ObjC/Cocoa program access my Oracle tables via OCI/libraries.


So that means that I need access to the ORACLE env variables.

Do the Oracle libraries require that the information be passed in environment variables, or is there some way in the library (via API) you can specify what to connect to? It would really be better to glean this information some other way (see below).


I want to have the Cocoa project be able to passively access the user's environment without the extra set up;
hence, I'm thinking of launching a NSTask to grab the necessary env variables to work with.


In sort, install the Cocoa project, launch it... then glean the necessary environment(s) for the information
to link with the Oracle session.

If it's necessary that you do this (i.e. because your users already have these set up in their environment), you could always have a first launch NSTask that executes a shell script to read the environment variables and then set them in your application's defaults database.


Setting environment variables in someone's OS X environment plist (as has been suggested elsewhere in the thread) means every process your users launch wind up getting these Oracle environment variables. Might not be a big problem, but it seems unnecessary.

.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


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

  • Prev by Date: Using CLI arguments in controller (scoping?)
  • Next by Date: Re: question about classes, I think
  • Previous by thread: Re: [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