Here’s another one of those maddening issues:
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3376
I’ve had to write a wrapper script around each command that polls the cicd job Id and kills its subprocesses properly if the job is cancelled.
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3376
I’ve had to write a wrapper script around each command that polls the cicd job Id and kills its subprocesses properly if the job is cancelled.
I don't know if you just need to do process groups or walk the subprocess tree or what... but generally, this is a solved problem on Linux for things that manage subprocesses... assuming the processes don't manually do something silly like daemonizing themselves. (That's not my use case.)
Linux should be the easiest case.
edit: What is most frustrating is this issue appears to have been opened ~4 years ago.