Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using
Unix.create_process_env
starts a child process, but nothing issetup to forward signals or interrupts. Making it impossible for the
started program to handle signal itself using
Sys.signal
orSys.catch_break
. This is a minor inconvinience for CLI programs (e.g.you can't implement a REPL that only exits when sending CTRL-C twice
like nodejs does), but this is a major problem for program that are
supposed to run in k8s.
K8s expects programs to keep serving requests when it sends a TERM
signal. The TERM signal is send before k8s makes sure that they won't
receive traffic anymore. It's expected that they mark themselves as not
ready, handle all open traffic, and shutdown when done. For this the
programs need to handle the TERM signal.