From 8649fd97b234c258613a1d17d2f4849bbb8bdf40 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Jun 2013 05:50:13 +0200 Subject: add default value 1 for lvl in args_parent_name in bash version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.bash | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/argparser.bash b/src/argparser.bash index 8b4a85a..1e79d50 100644 --- a/src/argparser.bash +++ b/src/argparser.bash @@ -133,6 +133,9 @@ function args_dispose function args_parent_name { local pid=$$ lvl=$1 found=0 line arg + if [ "${lvl}" = "" ]; then + lvl=1 + fi while (( $lvl > 0 )) && [ $found = 0 ]; do while read line; do if [ "${line:5}" = "PPid:" ]; then -- cgit v1.2.3-70-g09d2