diff options
author | Radu Ciorba <[email protected]> | 2017-08-12 02:21:27 +0300 |
---|---|---|
committer | Radu Ciorba <[email protected]> | 2017-08-12 02:21:27 +0300 |
commit | 69d3c0f1f24d58b3a7327ce15ba1e23e8a01e3f3 (patch) | |
tree | 47a44393da5c3415acd4569d9615a4556135d458 | |
parent | 1a1b11f4304dc7b9e3e9e86ac8680d9997fc01ff (diff) | |
download | kerl-69d3c0f1f24d58b3a7327ce15ba1e23e8a01e3f3.tar.gz kerl-69d3c0f1f24d58b3a7327ce15ba1e23e8a01e3f3.tar.bz2 kerl-69d3c0f1f24d58b3a7327ce15ba1e23e8a01e3f3.zip |
avoid PPID since it's used and readonly on mac + use ps -o ucomm
PPID variable already used and readonly on Mac.
ps's output flag comm is not consistent between Mac and Linux+FreeBDS, but ucomm seems to work everywhere
-rwxr-xr-x | kerl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -933,8 +933,8 @@ ACTIVATE_CSH fi PID=$$ - PPID=$(ps -p $PID -o ppid | grep -E "[0-9]+" -o) - PARENT_CMD=$(ps -p $PPID -o comm | tail -n 1) + PARENT_PID=$(ps -p $PID -o ppid | grep -E "[0-9]+" -o) + PARENT_CMD=$(ps -p $PARENT_PID -o ucomm | tail -n 1) case "$PARENT_CMD" in fish) SHELL_SUFFIX=".fish" |