Skip to content

Commit

Permalink
fix error geting pids
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Oct 25, 2022
1 parent 67dff2f commit 11f01b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions im_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ def im_stop():


def get_childs(parent_id=None):
if parent_id is None:
parent_id = os.getpid()
childs = []
for proc in psutil.process_iter():
if not parent_id or parent_id == proc.ppid():
Expand Down

0 comments on commit 11f01b6

Please sign in to comment.