Process relaunched automatically after SIGTERM or SIGKILL

74 Views Asked by At

I try to write a python script that will start a process and whenever an event occur the script terminates the process and relaunches it again after a delay.

In order to stop the process I use kill -15 (SIGTERM) followed by the pid of the process that I get with psutil. I have manually check that the pid is correct.

Once the kill command is issued I have found that the process is still alive and there are braces around its name. Like it goes from "zeek -i eth0" to "[zeek]".

I have also tried with SIGKILL but the result is the same.

Maybe it is relevant : the process is Zeek.

Once I tried to SIGKILL the process manually initially (when there is no braces) and it worked.

0

There are 0 best solutions below