githubnemo / CompileDaemon

Very simple compile daemon for Go
BSD 2-Clause "Simplified" License
1.61k stars 153 forks source link

Set pgid and kill the process group on posix #81

Open ederuiter opened 2 years ago

ederuiter commented 2 years ago

See https://medium.com/@felixge/killing-a-child-process-and-all-of-its-children-in-go-54079af94773 for a detailed explanation of how this works. For now this only implemented for posix and these changes should have no effect on windows. This fixes #65 and makes the script in #72 work (without this fix the script would be terminated on re-compile, but the go executable would continue to run, potentially causing issues with used resources like files and sockets)