Wireless Daemon for Linux
 help / color / mirror / Atom feed
* [PATCH v2 1/3] test-runner: allow infinite process wait
@ 2022-07-19 18:52 James Prestwood
  2022-07-19 18:52 ` [PATCH v2 2/3] test-runner: start dbus with --start James Prestwood
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: James Prestwood @ 2022-07-19 18:52 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

subprocess.Popen's wait() method was overwritten to be non-blocking but
in certain circumstances you do want to wait forever. Fix this to allow
timeout=None, which calls the parent wait() method directly.
---
 tools/utils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/utils.py b/tools/utils.py
index bc030230..7a182848 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -246,6 +246,10 @@ class Process(subprocess.Popen):
 
 	# Override wait() so it can do so non-blocking
 	def wait(self, timeout=10):
+		if timeout == None:
+			super().wait()
+			return
+
 		Namespace.non_block_wait(self.__wait, timeout, 1)
 		self._cleanup()
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-19 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 18:52 [PATCH v2 1/3] test-runner: allow infinite process wait James Prestwood
2022-07-19 18:52 ` [PATCH v2 2/3] test-runner: start dbus with --start James Prestwood
2022-07-19 18:52 ` [PATCH v2 3/3] test-runner: automatically find PCI passthrough config James Prestwood
2022-07-19 19:33 ` [PATCH v2 1/3] test-runner: allow infinite process wait Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox