Hey yall! Is there a bash command I can run to kil...
# general
a
Hey yall! Is there a bash command I can run to kill the pants daemon in a general way? Just creating a
make
command to nuke my repo for a clean restart.
cc: @dazzling-diamond-4749
d
just
Copy code
killall pantsd
a
I always get “No matching processes belonging to you were found”
h
Yeah, the name of the process is
pantsd [/path/to/repo]
d
oh, mac 🙂
maybe pgrep and
kill
?
let me see if pgrep is aval on brew
h
killall has
-m
which lets you regex-match the process name
but I can't get that to work either
There should probably be a pants command for this
🙌 1
d
here, this worked
Copy code
PANTSD_PID=$(ps ax | grep -e "pantsd \[" | cut -d' ' -f1); [ -z "$PANTSD_PID" ] || kill $PANTSD_PID
a
this worked too
pkill -f "pantsd.*"
edit:
pkill -f "pantsd.*" || echo "Pantsd process was not running."
so it doesn’t fail in makefile if not running
🙌 2