Improve fix for issue 47 using prep -x -o

The use of `pgrep -x`was proposed by @rnelson0. `pgrep -x -o` should limit the result to the oldest exactly matching execution of a binary called `docker`.

Signed-off-by: Joachim Lusiardi <joachim@lusiardi.de>
This commit is contained in:
Joachim Lusiardi 2015-06-29 22:22:12 +02:00 committed by Joachim Lusiardi
parent fae2639313
commit 2d29af704e

View file

@ -41,7 +41,7 @@ contains() {
get_command_line_args() {
PROC="$1"
for PID in `pgrep $PROC`
for PID in `pgrep -x -o $PROC`
do
cat /proc/$PID/cmdline | tr "\0" " "
done