Prior to calling the binary there is a line ". /x.y.z" where x.y.z is a
config file, sim. to a profile that has 'exports' imbedded in it. Prior to
the binary being called we can display the variable but thbinary cannot
resolve to it. There was a suggestion to running this at startup. I have to
talk to the developer and find out the relationship of this process to what
he is doing and what is globally needed.

                                                                  bobbee






From: Pavel Tolkachev <[EMAIL PROTECTED]>
Reply-To: MQSeries List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Script Question
Date: Thu, 7 Nov 2002 16:35:00 -0500

Hello Bobbee,

It might be a silly question, but still: do you export the variable or just
set it? I am asking such as the following one-liner:

unset A; rm nohup.out; echo "A=$A"; A=A_VALUE; export A; nohup perl -e
'print $ENV{A} . "\n"'; cat nohup.out

works fine for me in 3 different shells: sh, ksh and bash.

with the same output:

------cut here
A=
Sending output to nohup.out
A_VALUE
------cut here

I added "unset A" command in order to try it several times; however I swear
I do not set "A" in my .profile.

Another question is: what was the platform (the example above is from
Solaris 8)?

Hope this will help,
Pavel





                      Bill Seng
                      <bill.seng.b@BAYE        To:
[EMAIL PROTECTED]
                      R.COM>                   cc:
                      Sent by: MQSeries        Subject:  Re: Script
Question
                      List
                      <MQSERIES@AKH-Wie
                      n.AC.AT>


                      11/07/2002 01:37
                      PM
                      Please respond to
                      MQSeries List






Bobbee,

You could try the following:

   nohup ". ~/.profile; exec $PROC -file=$CONFIG $TRACE > $OUT 2>&1" &

However I haven't had much success with that.  Instead, I start the
adapters
using the unix "at" command within a script:

   at now <<-EOF >/dev/null 2>&1
   . ~/.profile
   cd $DIR
   exec $PROC -file=$CONFIG $TRACE > $OUT 2>&1
   EOF

Within it, I source in ~/.profile.

The environment variables DIR (location of the config file), PROC (adapter
process - NNSYAdapter38), CONFIG (name of configuration file), and TRACE ("
-trace" if trace is desired) are set within the script prior to invocation
of
the at command.  I use exec so that I don;t add any extraneous ksh
processes.

Regards,

Bill




                      Robert Broderick
                      <robertbroderick@H        To:
[EMAIL PROTECTED]
                      OTMAIL.COM>               cc:
                      Sent by: MQSeries         Subject:  Script Question
                      List
                      <MQSERIES@AKH-Wien
                      .AC.AT>


                      11/07/2002 08:41
                      AM
                      Please respond to
                      MQSeries List






We are running the New Era SAP R/3 adapter. In the script that starts up
the
process it runs a binary passing it a configuration file as a parameter.
The
configuration file references Environment variables that are loaded in and
outside of the USERID profile. When the binary is started using nohup a 'ps
-ef' shows it runnig under the starting USERID but it fails because the
environment it was started from is not being used. I would suspect the
.profile for the USERID may be set up but the additional ENVIRONMENT VARs
are not in there. Obviously I could add the extra stuff to the USERID's
.profile. or I could instead start a script 'nohup' and set up th3e
environment and execute the binary under the script.

My question is. is there a way to start the binary with nohup and have the
current environment copied to the new process environment???

                                            bobbee




_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive





--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to