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

only use setpgid for 'sh -c' wrapped subshell calls #1600

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

eikenb
Copy link
Contributor

@eikenb eikenb commented Jul 15, 2022

Previously setpgid was set for all commands. This had an unintended
side effect of breaking certain use cases, like using an interactive
'bash' as the command to be executed/managed as a way to debug/test your
setup.

This was also added as part of the conversion from the old (broken)
shell parser to using 'sh -c' subshells for those calls. After that
I added support for single commands and command lists that don't get
wrapped. Using setpgid is not needed on the non-wrapped calls as it was
added to ensure backwards compatibility with signal propagation for
the wrapped commands (the wrapping shell discards some signals).

Note this is an internal change with no documentation changes required.

Previously setpgid was set for all commands. This had an unintended
side effect of breaking certain use cases, like using an interactive
'bash' as the command to be executed/managed as a way to debug/test your
setup.

This was also added as part of the conversion from the old (broken)
shell parser to using 'sh -c' subshells for those calls. After that
I added support for single commands and command lists that don't get
wrapped. Using setpgid is not needed on the non-wrapped calls as it was
added to ensure backwards compatibility with signal propagation for
the wrapped commands (the wrapping shell discards some signals).
@eikenb eikenb added the bug label Jul 15, 2022
@eikenb eikenb added this to the v0.30.0 milestone Jul 15, 2022
@eikenb eikenb requested a review from a team July 15, 2022 20:28
@eikenb eikenb merged commit 5944aff into main Jul 18, 2022
@eikenb eikenb deleted the only-setpgid-for-subshells branch July 18, 2022 22:16
@eikenb eikenb modified the milestones: v0.30.0, v0.29.2 Aug 1, 2022
@eikenb
Copy link
Contributor Author

eikenb commented Aug 1, 2022

Fixes #1604

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

Successfully merging this pull request may close these issues.

1 participant