Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make setpgid configurable for exec commands #1848

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amCap1712
Copy link

#1494 added the setpgid setting to ensure signals are propagated to all processes and not just the subshell. However, this might not always be desirable.

For instance, servers like uWSGI run workers in subprocesses and wait for workers to finish processing active requests for a while before restarting them to support graceful reloading. consul-template sending the reload signal to all processes, sends singals to these worker processes in uWSGI as well which can interfere with graceful reloads.

Currently, we are working around this by using the array form of the command which does not set the pgid on the child process. But I feel it might be useful to make this option configurable as well.

If the flag is unset, the existing behavior is retained.

hashicorp#1494 added the setpgid setting to ensure signals are propagated to all
processes and not just the subshell. However, this might not always be
desirable.

For instance, servers like uWSGI run workers in subprocesses and wait
for workers to finish processing active requests for a while before
restarting them to support graceful reloading. consul-template sending
the reload signal to all processes, sends singals to these worker
processes in uWSGI as well which can interfere with graceful reloads.

Currently, we are working around this by using the array form of the
command which does not set the pgid on the child process. But I feel
it might be useful to make this option configurable as well.
@amCap1712 amCap1712 requested a review from a team as a code owner November 26, 2023 08:54
@hashicorp-cla
Copy link

hashicorp-cla commented Nov 26, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants