mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03: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) Upstream-commit: 1ee423bd5dd7abf6f5f4662132b77fdebf14529a Component: engine
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# /etc/rc.d/init.d/docker
|
||||
#
|
||||
# Daemon for docker.io
|
||||
#
|
||||
#
|
||||
# chkconfig: 2345 95 95
|
||||
# description: Daemon for docker.io
|
||||
|
||||
@@ -49,10 +49,12 @@ start() {
|
||||
$exec -d $other_args &>> $logfile &
|
||||
pid=$!
|
||||
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
|
||||
while [ ! -f $pidfile ]; do
|
||||
tries=0
|
||||
while [ ! -f $pidfile -a $tries -lt 10 ]; do
|
||||
sleep 1
|
||||
tries=$((tries + 1))
|
||||
done
|
||||
success
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user