Skip to content

Conversation

@clue
Copy link
Owner

@clue clue commented Apr 21, 2022

This simple changeset updates the recommended Dockerfile instructions to run X as PID 1 without an implicit wrapping shell. In particular, by avoiding an additional sh process, we can ensure any signals sent always target the php process directly.

Note that PID 1 has special semantics on Unix-based systems. In particular, it does not have any default signal handling (which is why this builds on top of #150 first) and has additional responsibilities to reap zombie child processes. Child processes spawned directly using the ChildProcess component should be reaped just fine, but orphaned processes from deeper process trees may require special care. If in doubt, using a small init process like tini or dump-init inside your Docker container may be a good idea. In the long run, X should get additional features to handle the SIGCHLD signal to take care of any orphaned processes itself, but this is currently out of scope for this PR and should be addressed in a follow-up PR in the future.

Link dump for further details:

Builds on top of #136, #149 and #150

@clue clue added the documentation Improvements or additions to documentation label Apr 21, 2022
@clue clue requested a review from SimonFrings April 21, 2022 07:29
@SimonFrings SimonFrings merged commit ac24fa4 into clue:main Apr 21, 2022
@clue clue deleted the pid1 branch April 21, 2022 08:41
@SimonFrings SimonFrings added this to the v0.9.0 milestone Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants