|
From: James E. P. <je...@do...> - 2001-03-16 17:31:01
|
Hi.
How do I kill my Expect object? I've got lingering processes that
were $obj->spawn()'ed which don't get killed when my perl script
finishes. I don't want to interact, I want it dead.
(OK, this next question isn't really Expect specific, but...)
This chunk of code is in a library of routines that I've written to
help write test cases ..
unless ($lrb->expect($Settings::timeout, $Settings::boot_prompt))
{
print STDERR "reboot: No boot prompt found.\n";
#exit $Settings::UNDECIDED;
exit 2;
}
This is being run from a shell script:
#!/bin/sh
$testcase > ./$testname.out 2> ./$testname.err
ret=$?
case $ret in
0) echo "$testname: PASS";;
1) echo "$testname: FAIL";;
2) echo "$testname: UNDECIDED";;
*) echo "$testname: INSANITY";;
esac
I'm getting the printout from that error case above, but the return
value I'm getting in the shell is 0.
What am I doing wrong?
Thanks,
James
__
__
James E. Pace \o\_____ Manager of Software Quality
je...@do... ##[==_____> "Put a Rocket
(408) 371-8977 x106 /_/ dotRocket on your Socket."
|