From bbd03af7add543b482863b2df51bb745ad96c236 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Thu, 18 Sep 2025 11:29:29 +0200 Subject: [PATCH] refs #2822 wait() in a loop --- CHANGELOG.md | 6 ++++++ src/opengnsys/workers/oglive_worker.py | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 910719f..9d898e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [8.3.2] - 2025-09-18 + +### Fixed + +- Wait for children within a loop, not just once + ## [8.3.1] - 2025-09-11 ### Fixed diff --git a/src/opengnsys/workers/oglive_worker.py b/src/opengnsys/workers/oglive_worker.py index 7c1ec5e..2e31cda 100644 --- a/src/opengnsys/workers/oglive_worker.py +++ b/src/opengnsys/workers/oglive_worker.py @@ -341,12 +341,13 @@ class ogLiveWorker(ServerWorker): sout = stdout_buf.decode('utf-8', 'ignore').strip() serr = stderr_buf.decode('utf-8', 'ignore').strip() - try: - p.wait (0.1) - finished = True - except subprocess.TimeoutExpired: - ## BUG: dejamos un zombie colgando - pass + ## our child already closed stdout/stderr but it may not immediately exit + ## we need to wait for it within a loop, not just once + while True: + try: + p.wait (1) + except subprocess.TimeoutExpired: + pass ## DEBUG