Hi Peter,

        Try redirecting the stdio streams as follows (particularly stdin):

/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1 0</dev/tty 1/dev/null 2>&1 &

        Best regards,

       Justin T. Fries
       WebSphere MQ Support
       Raleigh, North Carolina



"Potkay, Peter M (ISD, IT)" <[EMAIL PROTECTED]>
Sent by: MQSeries List <[EMAIL PROTECTED]>

07/22/2004 04:08 PM

Please respond to
MQSeries List

To
[EMAIL PROTECTED]
cc
Subject
How to trigger amqsput into the background





Solaris 2.8
MQ 5.3 CSD4

I have runmqtrm running in the foreground.

I have the following in my ApplID field of the process definition:
/var/mqm/peterscript.sh

I have the following in /var/mqm/peterscript.sh:
/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1

This works great, as I see the following in the Trigger Monitor Window:
__________________________________________________
Waiting for a trigger message

/var/mqm/peterscript.sh 'TMC    2PETER
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
my test message to be put

Sample AMQSPUT0 end
End of application trigger.

__________________________________________________
Waiting for a trigger message


So now I want the trigger monitor to kick off amqsput in the background. I
don't care that I won't be able to put to it, I will use ps -ef|grep amqsput
to verify it is up, and then kill -9 it.

I tried putting this inside the script:
/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1 &

and got this in the trigger monitor window:
__________________________________________________
/var/mqm/peterscript.sh 'TMC    2PETER
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
Sample AMQSPUT0 end
End of application trigger.

__________________________________________________
Waiting for a trigger message


It just ends amqsput right away. It is not running in the background.

<snip>

Reply via email to