melodic-agent-3403
10/15/2024, 3:42 PMgit commands.
Pants likes to frequently cancel this command (this thread indicates that it's probably due to its speculative execution).
However, the way it cancels shell commands seems to sometimes kills git in the middle, leaving dangling .git/index.lock files that block any subsequent git commands.
This leads me to believe that pants cancels commands using SIGKILL, which seems unreasonably violent. Is this true and is there a way to stop it, or work around it so git can clean up after itself?melodic-agent-3403
10/15/2024, 3:44 PMfast-nail-55400
10/15/2024, 4:02 PMfast-nail-55400
10/15/2024, 4:05 PMmelodic-agent-3403
10/15/2024, 4:27 PMgit survives the parent process being killed, while still being able to read its output?
I can wrap my script into another script that is spawned as some subprocess. It's ugly, but maybe necessary 😞melodic-agent-3403
11/12/2024, 3:12 PMgit as a subprocess that is safe from pants' SIGKILL, but nothing seems to work:
• & to run it as a background process
• disown to detach it from the shell's jobs
• nohup to detach it from the shell's pipes
• bash -c "<subcommand> &" to make sure its process parent ID gets set to 1
Several of these work fine if i run them manually and kill -9 <pid> their calling bash script.
But somehow pants still finds my orphans and kills them, leaving behind occasional git lockfiles and corrupting our users' repo.
Any ideas to fix this?