From 2542ff283fab05500f47c8d21ff59eda1a847876 Mon Sep 17 00:00:00 2001 From: tegwick Date: Wed, 18 Mar 2026 23:18:31 +0100 Subject: [PATCH] fix(makefile): use fuser port-kill instead of pkill pattern for restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pkill -f matched the shell subprocess's own argv (which contains the pattern as a -c argument), causing make to receive SIGTERM and abort. fuser -k 8000/tcp / 3000/tcp targets only the process bound to the port — no self-kill risk. Co-Authored-By: Claude Sonnet 4.6 --- state-hub/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state-hub/Makefile b/state-hub/Makefile index d621d7c..44c6492 100644 --- a/state-hub/Makefile +++ b/state-hub/Makefile @@ -36,7 +36,7 @@ mcp-http: MCP_TRANSPORT=sse MCP_PORT=8001 uv run python mcp_server/server.py dashboard: - @pkill -f "observable preview" 2>/dev/null && echo "Stopped running dashboard" || true + @fuser -k 3000/tcp 2>/dev/null && echo "Stopped running dashboard" || true cd dashboard && npm run dev check: @@ -115,7 +115,7 @@ backend: db sleep 1; \ done $(MAKE) migrate - @pkill -f "uvicorn api.main:app" 2>/dev/null && echo "Stopped running API" || true + @fuser -k 8000/tcp 2>/dev/null && echo "Stopped running API" || true $(MAKE) api ## Register a project: make register-project DOMAIN=railiance PROJECT_PATH=/home/worsch/railiance