summaryrefslogtreecommitdiffstats
path: root/pidwait.sh
blob: aeb97e18c80485c171da7897436f0e1d63ba59e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

if (($#<1)); then
	echo "usage: ${0##*/} <pid>"
	exit
fi

pid=$1

while [[ -d /proc/$pid ]]; do
	sleep 1
done