@ 260802.2

260529.3 · 91e76294d0c9dd823fa0fcb32e52ac83a9b8a1cb

bin: fix some mistakes with process handling

The main bug here was that `pgrep` silently doesn't match when the process name is longer than 15 characters. At first I was quite annoyed at pgrep, but this actually looks like a Linux kernel pecadillo. Quite annoying.

reading declarations

Changes to bin/process-running. All files

bin/process-running

@@ -6,7 +6,7 @@ if [ -z "$process" ]; then   echo "Usage: $(basename "$0") <process-name>" >&2   exit 1 fi-if pgrep -q "^$process$" &> /dev/null; then+if pgrep -f "(^|/)$process($|\\s+)" &> /dev/null; then   exit 0 fi exec "$process" "$@"