linux-wait

linux-wait

for pid in $(jobs -p); do
    wait $pid
    status=$?
    if [ $status != 0 ]; then
        echo " $pid status is $status have some error!" >> your_log
    else
        echo "$pid status is $status success!" >> your_log
    fi
done

Reference

wait(1p) - Linux manual page


本站总访问量次 本站访客数人次 本文总阅读量