shell脚本使用exit 0退出后,为什么进程还在(kill -0 该进程返回0)

退出代码如下:

 if [ -f ${destdir}/${filepre}${_date}${_fileseq0}  ];then
        lgWriteLog INFO "main" 0 "${destdir}/${filepre}${_date}${_fileseq0} exist ,skip..."
        exit 0
fi

而后检测代码如下:

 PIDLock=$MCB_HOME/${MCB_APPID}/var/tmp/.${MySelf}.lck
if [ -r $PIDLock ]; then
        cat $PIDLock | read pid
        kill -0 $pid > /dev/null 2>&1
        if [ $? -eq 0 ]; then
                echo "The same program ${MySelf} is running now."
                lgWriteLog "SERIOUS" "" 1 "The same program ${MySelf} is running now,exit!"
                exit 1
        fi
fi

https://blog.csdn.net/feixiaohuijava/article/details/53419721