Skip to content

Commit

Permalink
code: wait 30s for clean exit, chg warn to debug, upversion
Browse files Browse the repository at this point in the history
  • Loading branch information
choppsv1 committed Feb 17, 2023
1 parent c8c92b1 commit bcad50d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions munet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ async def cleanup_pid(self, pid, kill_pid=None):
if kill_pid is None:
kill_pid = pid

for sn in (signal.SIGTERM, signal.SIGKILL):
for sn in (signal.SIGHUP, signal.SIGKILL):
self.logger.debug(
"%s: %s %s (wait %s)", self, signal.Signals(sn).name, kill_pid, pid
)
Expand All @@ -420,7 +420,7 @@ async def cleanup_pid(self, pid, kill_pid=None):
return

# try each signal, waiting 15 seconds for exit before advancing
wait_sec = 20
wait_sec = 30
self.logger.debug("%s: waiting %ss for pid to exit", self, wait_sec)
for _ in Timeout(wait_sec):
try:
Expand Down
4 changes: 1 addition & 3 deletions munet/native.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,7 @@ async def get_proc_child_pid(self, p):
spid = str(p.pid)
for _ in Timeout(4):
if p.returncode is not None:
self.logger.warning(
"%s: exit before getting child of proc: %s", self, p
)
self.logger.debug("%s: proc %s exited before getting child", self, p)
return None

rc, o, e = await commander.async_cmd_status(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "munet"
version = "0.12.8"
version = "0.12.9"
description = "A package to facilitate network simulations"
authors = ["Christian Hopps <chopps@labn.net>"]
license = "GPL-2.0-or-later"
Expand Down

0 comments on commit bcad50d

Please sign in to comment.