I have started a python script by following:
nohup python src/myscript.py &
Now there is a process running, where the PID is changing constantly, so it is absolutely not possible to kill it. When I try this one nohup process killing, it says the -sh: kill: (8792) - No such process
.
Also tried to grep
it by name and kill it, same issue, because the PID is changing constantly. As noted by @MarcusMüller in a comment, apparently this is because it constantly spawns new browser instances.
Really confused why nothing is working, restart did not work. Considering to reinstall whole system ...
nohup
doesn't change PIDs (try withnohup sleep 600
). In fact, it's impossible to change PIDs at runtime as process. more likely, your script isforking
/spawing a lot of subprocesses. What specifically doesmyscript.py
do?killall
command, specifying the process command line as shown intop
et al...