Closed timreinke closed 2 months ago
don't really want to mess with that logic since it has a history of having weird edge-cases and it was pretty stable since the last change, so would prefer an env-var escape hatch instead
Yeah, I don't think I'd want to step into that one either :)
I switched to using an envvar, and can update the PR title/desc + add a small note in the README if you think this is worth getting in.
On my end, I've ended up finding it's better to install an interrupt handler in the top-level shell process, and send SIGINT directly to the test runners. Trying to get everything between to propagate and behave nicely turned out a bit of a fool's errand. So I'm just as happy to close this.
thx for digging into this mess, let's close it until someone else comes around that needs it then :)
Hi,
I think there's a problem with how the SIGINT forwarding works. Checking
Process.getpgid(child_pid) != Process.pid
can be wrong in both directions:rake
, the check will pass and a second interrupt will sendIn my case, I want to perform cleanup (release selenium grid handles) when a github workflow is cancelled. If I define my step as:
Then the
parallel_test
is group leader andProcess.getpgid(child_pid) == Process.pid
, so the signal is swallowed.One workaround is:
Now the runner shell remains the group leader and the check passes -- it's kind of a bother though :). There's a lot of discussion about how github could do better, but here we are.
This changes the check to use
tty?
- which itself can be wrong (redirects in shell or command runners). This feels like the sort of thing where someone will always be unhappy, unfortunately. Could add an envvar as an escape hatch?Checklist
master
(if not - rebase it).