mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
added timeout when waiting for docker pidfile
Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
This commit is contained in:
parent
a598dba134
commit
1ee423bd5d
1 changed files with 5 additions and 3 deletions
|
@ -49,10 +49,12 @@ start() {
|
||||||
$exec -d $other_args &>> $logfile &
|
$exec -d $other_args &>> $logfile &
|
||||||
pid=$!
|
pid=$!
|
||||||
touch $lockfile
|
touch $lockfile
|
||||||
# wait for the pidfile to exist. see
|
# wait up to 10 seconds for the pidfile to exist. see
|
||||||
# https://github.com/dotcloud/docker/issues/5359
|
# https://github.com/dotcloud/docker/issues/5359
|
||||||
while [ ! -f $pidfile ]; do
|
tries=0
|
||||||
|
while [ ! -f $pidfile -a $tries -lt 10 ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
tries=$((tries + 1))
|
||||||
done
|
done
|
||||||
success
|
success
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Add table
Reference in a new issue