Skip to content

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 4, 2024

When running processes with the capture of stdin/stdout, the Kill method will not work properly on Linux.
It seems that a child process is spawned, so it's needed to create a process group and kill the process group (that will also catch the children process).

https://groups.google.com/g/golang-nuts/c/XoQ3RhFBJl8

cmaglie added 2 commits June 4, 2024 12:19
The kill method now kills also the children processes.
@cmaglie cmaglie self-assigned this Jun 4, 2024
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 4, 2024
Copy link
Contributor

@alessio-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯

@cmaglie cmaglie merged commit 6444974 into master Jun 4, 2024
@cmaglie cmaglie deleted the kill_improvements branch June 4, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants