Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed ps wait

  • Loading branch information...
commit 67d2b294228d258a4ead8f4338f5dfd33deb27bd 1 parent 5d985da
@Lispython authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  daemon.py
View
3  daemon.py
@@ -115,8 +115,7 @@ def stop(self):
def kill_child_processes(parent_pid, sig=SIGTERM):
ps_command = subprocess.Popen("ps -o pid --ppid %d --noheaders" % parent_pid, shell=True, stdout=subprocess.PIPE)
ps_output = ps_command.stdout.read()
- retcode = ps_command.wait()
- assert retcode == 0, "ps command returned %d" % retcode
+
for pid_str in ps_output.split("\n")[:-1]:
os.kill(int(pid_str), sig)
Please sign in to comment.
Something went wrong with that request. Please try again.