[PR #6159] fix: kill signal is not passed to the main process #25180

Closed
opened 2026-02-21 20:24:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/6159

State: closed
Merged: Yes


Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

Fixes #6158

The root cause is that the main process is not PID=1, and kill signal is not passed to it. To make the main process PID=1, this PR addede exec when calling the main process.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Build an api container image and confirmed it runs and shut down successfully.

cd api
docker build -t api .
docker run api # then Ctrl+C
docker run -e MODE=beat api # then Ctrl+C
docker run -e MODE=worker api # then Ctrl+C
docker run -e DEBUG=true api # then Ctrl+C
**Original Pull Request:** https://github.com/langgenius/dify/pull/6159 **State:** closed **Merged:** Yes --- # Checklist: > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [X] Please open an issue before creating a PR or link to an existing issue - [X] I have performed a self-review of my own code - [X] I have commented my code, particularly in hard-to-understand areas - [X] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods # Description Fixes #6158 The root cause is that the main process is not PID=1, and kill signal is not passed to it. To make the main process PID=1, this PR addede `exec` when calling the main process. ## Type of Change - [X] Bug fix (non-breaking change which fixes an issue) # Testing Instructions Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration Build an api container image and confirmed it runs and shut down successfully. ```sh cd api docker build -t api . docker run api # then Ctrl+C docker run -e MODE=beat api # then Ctrl+C docker run -e MODE=worker api # then Ctrl+C docker run -e DEBUG=true api # then Ctrl+C ```
yindo added the pull-request label 2026-02-21 20:24:26 -05:00
yindo closed this issue 2026-02-21 20:24:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#25180