#!/bin/csh

#Check availability of SigAction handler on all platform. (SPR #212)
# For that a sender is started in diffrent platform and a receiver asked to interrupt communication
# with the sender via CmRequestKill while the communication
# is still underway. In the correct situation the SigAction Handler is executed,
# the " Cm> Signal 13 received" messagge appear and the sender
# server terminate correctly and print "Sent 100000 message"

source ../cmt/setup.csh
source ${CMROOT}/mgr/CmConfig.sh ${CMROOT} CascinaVCS



$CMROOT/$CMCONFIG/server.exe >& /dev/null &
sleep 1
$CMROOT/$CMCONFIG/bench.exe testServer -loops=1000000 &
sleep 1
cm send -to testServer -type CmRequestKill -text bench
sleep 1
cm send -to testServer -type test -text "last"

$CMROOT/$CMCONFIG/server.exe >& /dev/null &
sleep 1
/usr/bin/ssh swtest6 "source $CMROOT/cmt/setup.sh; export CMDOMAIN=CascinaVCS; $CMROOT/$UNAME/bench.exe testServer -loops=1000000 &" &
sleep 3
cm send -to testServer -type CmRequestKill -text bench
sleep 1
cm send -to testServer -type test -text "last"

sleep 20
exit 0
#
