diff options
author | Aaron LI <aly@aaronly.me> | 2018-08-06 23:05:59 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-08-06 23:05:59 +0800 |
commit | 0cbb8d5f65c60b2bb24ca1e174c880d23c818ded (patch) | |
tree | 5f8c00a3339b3b6c7c4edb62b026f7dd318fc34a /unix | |
parent | 4f58d5ec4c5c826896e75b5695e5dd87938f0a5c (diff) | |
download | atoolbox-0cbb8d5f65c60b2bb24ca1e174c880d23c818ded.tar.bz2 |
unix/waiton.sh: Improve output
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/waiton.sh | 8 |
1 files 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 |