Kill nohup process with changing PID

Hi there!

I have a tricky problem concerning a nohup process:

I started a python2.7 script which loops over a function.
At the end it restarts the function. Due to a mistake I'm now having a never ending nohup process that I have to kill.

I started the program execution with:

>>

nohup python2.7 myscript.py

with

>>

ps -ef|grep nohup

I see that the PID is constantly changing.

How can I kill all nohup processes.:confused:

I already tried:
killall -9 myscript.py
pkill myscript.py

Did not work.

Thanks for your help!

Lydia

Can't you kill the parent process?

Thanks for your fast reply!

How do I find out the parent process ID?

What I did now to minimize the damage :
I moved the complete folder, where the script is working on to another place. With that I avoid the creation of the output text-files, which were messing up my folder and eating up storage capacity.

The nohup process is still running - still changing ID every second or faster. ..

Look at the header of your ps output:

F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD

The PPID is the column holding each process' parent ID. DON'T try to kill PID 1, should that show up under PPID.

Thanks a lot, Rudi!
That worked for me!