--- a/svghmi/svghmi_server.py Mon Oct 09 16:42:11 2023 +0200
+++ b/svghmi/svghmi_server.py Mon Oct 09 16:42:59 2023 +0200
@@ -307,15 +307,15 @@
def waitpid_timeout(proc, helpstr="", timeout = 3):
- def waitpid_timeout_loop(pid=proc.pid, timeout = timeout):
+ def waitpid_timeout_loop(proc = proc, timeout = timeout): - while os.waitpid(pid,os.WNOHANG) == (0,0):
+ while proc.poll() is None: GetPLCObjectSingleton().LogMessage(
LogLevelsDict["WARNING"],
- "Timeout waiting for {} PID: {}".format(helpstr, str(pid)))
+ "Timeout waiting for {} PID: {}".format(helpstr, str(proc.pid))) # workaround exception "OSError: [Errno 10] No child processes"