]> git.phdru.name Git - dotfiles.git/commitdiff
Fix(bin): Fix `KillAll`: `return` -> `exit`
authorOleg Broytman <phd@phdru.name>
Sun, 1 May 2022 20:49:14 +0000 (23:49 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 1 May 2022 20:49:14 +0000 (23:49 +0300)
The script was not fully ported from a shell function.

bin/KillAll

index 92dbf74bc7098d59b354466581bba74969b8c0a5..63ae4dc8646df5e1cbfb293e56284694a6588e1f 100755 (executable)
@@ -3,8 +3,9 @@
 # A kind of pkill/killall
 if [ -z "$1" -o -n "$3" ]; then
    echo "Usage: KillAll [-signal] proc_regexp" >&2
 # A kind of pkill/killall
 if [ -z "$1" -o -n "$3" ]; then
    echo "Usage: KillAll [-signal] proc_regexp" >&2
-   return 1
+   exit 1
 fi
 fi
+
 if [ -z "$2" ]; then
    kill `pidOf "$1"`
 else
 if [ -z "$2" ]; then
    kill `pidOf "$1"`
 else