https://pantsbuild.org/ logo
#general
Title
# general
a

acoustic-agent-61722

09/16/2021, 6:23 PM
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

dazzling-diamond-4749

09/16/2021, 7:09 PM
just
Copy code
killall pantsd
a

acoustic-agent-61722

09/16/2021, 7:10 PM
I always get “No matching processes belonging to you were found”
h

happy-kitchen-89482

09/16/2021, 7:11 PM
Yeah, the name of the process is
pantsd [/path/to/repo]
d

dazzling-diamond-4749

09/16/2021, 7:11 PM
oh, mac 🙂
maybe pgrep and
kill
?
let me see if pgrep is aval on brew
h

happy-kitchen-89482

09/16/2021, 7:13 PM
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

dazzling-diamond-4749

09/16/2021, 7:16 PM
here, this worked
Copy code
PANTSD_PID=$(ps ax | grep -e "pantsd \[" | cut -d' ' -f1); [ -z "$PANTSD_PID" ] || kill $PANTSD_PID
a

acoustic-agent-61722

09/16/2021, 7:17 PM
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
4 Views