Closed
Description
Hi - I recently discovered go-task. Overall this is pretty impressive! I am utilizing go-task as a makefile replacement on a repository that builds packer (another great go project) images. In the process I have discovered that go-task does not proxy unix signals to child processes. This presents an issue when the task that go-task is running needs to do clean up. For example, when the packer process receives SIGINT (ctrl+c) it will stop what is it doing and execute its cleanup actions so as not to leave random artifacts of half build VMs. Having go-task handle signals in the following way would help to address this issue:
- Trap SIGTERM and SIGINT
- Send the trapped signal to the child process
- Wait for the child process to exit
- Exit with the exit code of the child process
As a bonus, if go-task receives SIGINT or SIGTERM more than once, it should exit immediately.