Update shutdown commands to use lsof -ti for consistency
This commit is contained in:
11
AGENTS.md
11
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 <PID>
|
||||
# Find and kill process using port 8080
|
||||
kill -TERM $(lsof -ti :8080)
|
||||
```
|
||||
|
||||
### Server Not Responding
|
||||
|
||||
Reference in New Issue
Block a user