summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_process.c
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2022-11-30 00:13:22 +0000
committerAndrew Clayton <a.clayton@nginx.com>2023-02-17 21:24:18 +0000
commitd98a1b0dd7c5a4105c44fa1696d4f01b9f3e0db0 (patch)
treed3d8d23c7e43769f1f5724e04c5637916538fcac /src/nxt_process.c
parent3ecdd2c69c4864526c63b8e55df22ad1a86f3c72 (diff)
downloadunit-d98a1b0dd7c5a4105c44fa1696d4f01b9f3e0db0.tar.gz
unit-d98a1b0dd7c5a4105c44fa1696d4f01b9f3e0db0.tar.bz2
Enable the PR_SET_CHILD_SUBREAPER prctl(2) option on Linux.
This prctl(2) option can be used to set the "child subreaper" attribute of the calling process. This allows a process to take on the role of 'init', which means the process will inherit descendant processes when their immediate parent terminates. This will be used in an upcoming commit that uses a double fork(2) + unshare(2) to create a new PID namespace. The parent from the second fork will terminate leaving the child process to be inherited by 'init'. Aside from it being better to maintain the parent/child relationships between the various unit processes, without setting this you need to ^C twice to fully quit unit when running in the foreground after the double fork. Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions