repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
make getpeername() return the original socket address which before it was intercepted
[hband-tools.git]
/
user-tools
/
waitpid
blob
e3c5437137c0e9ec6e1b936ae7aa053b69280f9c
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
waitpid - Wait for a process to end (even if not child of current shell)
9
10
=cut
11
12
EOF
13
14
15
if
[
"
$1
"
-gt
0
]
2
>/
dev
/
null
16
then
17
pid
=
$1
18
while
[
-d
/
proc
/
$pid
]
19
do
20
sleep
0.5
21
done
22
exit
0
23
else
24
echo
"Usage:
$0
[PID]"
>&
2
25
exit
1
26
fi