aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Fenoll <[email protected]>2017-12-14 16:16:40 +0100
committerPierre Fenoll <[email protected]>2018-03-14 11:41:52 +0100
commit136105e82cff0a97a0ca653cbfee36a408260a4c (patch)
treecbe2ea3aff06ca7d4f8fd06377f9d9138fd0f243
parent979d186088dc3051b22b5f94fffd4d4e76f57c09 (diff)
downloadkerl-136105e82cff0a97a0ca653cbfee36a408260a4c.tar.gz
kerl-136105e82cff0a97a0ca653cbfee36a408260a4c.tar.bz2
kerl-136105e82cff0a97a0ca653cbfee36a408260a4c.zip
In kerl line 1113:
PARENT_CMD=$(ps -p $PARENT_PID -o ucomm | tail -n 1) ^-- SC2086: Double quote to prevent globbing and word splitting.
-rwxr-xr-xkerl5
1 files changed, 3 insertions, 2 deletions
diff --git a/kerl b/kerl
index a005976..540f4f5 100755
--- a/kerl
+++ b/kerl
@@ -1114,8 +1114,9 @@ ACTIVATE_CSH
fi
PID=$$
- PARENT_PID=$(ps -p $PID -o ppid | grep -E "[0-9]+" -o)
- PARENT_CMD=$(ps -p "$PARENT_PID" -o ucomm | tail -n 1)
+ PARENT_PID=$(ps -p $PID -o ppid=) || exit 1
+ # shellcheck disable=SC2086
+ PARENT_CMD=$(ps -p $PARENT_PID -o ucomm | tail -n 1)
case "$PARENT_CMD" in
fish)
SHELL_SUFFIX=".fish"