mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-02 22:02:13 +08:00
fix(scripts): add next-server to serve.sh cleanup trap (#1162)
The cleanup() trap kills "next dev" and "next start" but not "next-server". Since "next start" forks a "next-server" child process, killing the parent may leave the child running as a zombie, holding port 3000. The startup teardown block (line 35) already handles this, but the Ctrl+C / SIGTERM trap did not. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -92,6 +92,7 @@ cleanup() {
|
||||
pkill -f "uvicorn app.gateway.app:app" 2>/dev/null || true
|
||||
pkill -f "next dev" 2>/dev/null || true
|
||||
pkill -f "next start" 2>/dev/null || true
|
||||
pkill -f "next-server" 2>/dev/null || true
|
||||
# Kill nginx using the captured PID first (most reliable),
|
||||
# then fall back to pkill/killall for any stray nginx workers.
|
||||
if [ -n "${NGINX_PID:-}" ] && kill -0 "$NGINX_PID" 2>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user