git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
don't set page size by default
[tridge/junkcode.git]
/
killwait.sh
1
#!/bin/sh
2
3
4
waitforpid() {
5
pid=$1
6
timeout=$2 # in seconds
7
_wcount=0
8
while kill -0 $pid; do
9
sleep 1;
10
wcount=`expr $wcount + 1`
11
if [ $wcount -eq $timeout ]; then
12
last;
13
fi
14
done
15
}
16
17
waitforpid $1 $2