stressit_em 892 Bytes
#! /bin/sh

LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH


SHMKEY=$$
#echo shmkey is $SHMKEY

$ROOT/usr/etc/driverd &
DRIVERD_PID=$!
#echo driverd pid is $DRIVERD_PID

if [ $# -ne 0 ]
then
    $ROOT/usr/sbin/emulate -e -a "$*" -k $SHMKEY stress_em rom_em  &
else
    $ROOT/usr/sbin/emulate -e -k $SHMKEY stress_em rom_em  &
fi

EMULATE_PID=$!
#echo emulate pid is $EMULATE_PID

$ROOT/usr/tv/bin/dbgif -kcdbr -e $EMULATE_PID &

DBGIF_PID=$!
#echo dbgif pid is $DBGIF_PID

trap "killall emulate stressui; kill -9 $DRIVERD_PID $DBGIF_PID; ipcrm -M $$; exit" 1 2 3 15

#echo start user interface
#echo emulate pid is $EMULATE_PID dbgif pid is $DBGIF_PID

# Ui key pid_of_emulate
cd Ui
stressui ../stresstcl_em.so $$ $EMULATE_PID ../stresstcl_em.so

echo "killing driverd, emulate and dbgif $DRIVERD_PID $EMULATE_PID $DBGIF_PID"
kill -2 $EMULATE_PID
kill -9 $DRIVERD_PID $DBGIF_PID
ipcrm -M $$
exit 0