Skip to content

Make setpgid configurable for exec commands#1848

Closed
amCap1712 wants to merge 1 commit intohashicorp:mainfrom
amCap1712:make-setpgid-configurable
Closed

Make setpgid configurable for exec commands#1848
amCap1712 wants to merge 1 commit intohashicorp:mainfrom
amCap1712:make-setpgid-configurable

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.

#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.

@amCap1712 amCap1712 closed this by deleting the head repository Jul 2, 2025
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