From f50de95f05464d2e5a9d4a1273ca1f762621479e Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Fri, 3 Apr 2026 15:35:06 +0200 Subject: [PATCH] Update shutdown commands to use lsof -ti for consistency --- AGENTS.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9e3bc65..ebbdee9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -182,7 +182,7 @@ curl -s http://localhost:8080/api/health To stop the server gracefully: ```bash # Send SIGTERM for graceful shutdown -pkill -TERM -f "go run" +kill -TERM $(lsof -ti :8080) # Or send SIGINT (Ctrl+C equivalent) pkill -INT -f "go run" @@ -198,7 +198,7 @@ pkill -INT -f "go run" For force stop (if graceful shutdown hangs): ```bash -pkill -f "go" +kill -9 $(lsof -ti :8080) ``` **Verification:** @@ -411,11 +411,8 @@ router.Route("/api/v1", func(r chi.Router) { ### Port Already in Use ```bash -# Find process using port 8080 -lsof -i :8080 - -# Kill the process -kill -9 +# Find and kill process using port 8080 +kill -TERM $(lsof -ti :8080) ``` ### Server Not Responding