Commit ca5eba6a authored by Julien Muchembled's avatar Julien Muchembled

slapos-kill: exclude self

This is required when the only criterion is on the command-line.
Since we have wrappers to work around the shebang limitation,
the --name option can't be used anymore for Python applications.
parent 2bdf2a58
......@@ -52,9 +52,11 @@ def kill():
import psutil
r = 1
me = os.getpid()
for p in psutil.process_iter():
try:
if (pid and p.pid not in pid or
if (me == p.pid or
pid and p.pid not in pid or
args.name and p.name() not in args.name or
exe and p.exe() not in exe):
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment