Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Fix bug of detecting exist process
Browse files Browse the repository at this point in the history
  • Loading branch information
WangXing committed Jun 24, 2016
1 parent 7ee9d9a commit 420558e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-gc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ SYSLOG_LEVEL=${SYSLOG_LEVEL:=info}
SYSLOG_TAG=${SYSLOG_TAG:=docker-gc}
DRY_RUN=${DRY_RUN:=0}

for pid in $(pidof -s docker-gc); do
for pid in $(pgrep -f docker-gc); do
if [[ $pid != $$ ]]; then
echo "[$(date)] : docker-gc : Process is already running with PID $pid"
exit 1
Expand Down

0 comments on commit 420558e

Please sign in to comment.