The exit code should be fine. I tested it with a simple script and it returns 1:
# cat test.sh foo(){ kill -0 9999; local rc=$? echo $rc }
foo
The exit code should be fine. I tested it with a simple script and it returns 1:
# cat test.sh
foo(){
kill -0 9999; local rc=$?
echo $rc
}
foo