From 0cbb8d5f65c60b2bb24ca1e174c880d23c818ded Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 6 Aug 2018 23:05:59 +0800 Subject: unix/waiton.sh: Improve output --- unix/waiton.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/waiton.sh b/unix/waiton.sh index 67d88ac..988d3d3 100755 --- a/unix/waiton.sh +++ b/unix/waiton.sh @@ -14,13 +14,13 @@ case "$1" in esac pid="$1" -me="${0##*/}($$)" -name=$(ps -p ${pid} -o comm=) +me="${0##*/} (pid=$$)" +name=$(ps -p ${pid} -o args=) if [ $? -eq 0 ]; then - echo "${me}: waiting for process (${pid}, ${name}) to finish ..." + echo "${me}: waiting for process (pid=${pid}, ${name}) to finish ..." while ps -p ${pid} >/dev/null 2>&1; do echo -n . - sleep 1 + sleep 3 done echo else -- cgit v1.2.2