In a regular distro, I have a script script
with a shebang line #!/usr/bin/python
. Then, when I start it, it starts in a process called script
. It can handle interrupts, so I can then run pkill -USR1 script
to activate a function in the script.
In NixOS, a shebang line of #!\usr\bin\env python
breaks this workflow, as it then names the process python
, so sending these interrupts becomes more complicated.
I can’t manually find the pid to send the signal to every time, so how can the script work?