diff --git a/PILOTVERSION b/PILOTVERSION index 8116d067..e3b1f212 100644 --- a/PILOTVERSION +++ b/PILOTVERSION @@ -1 +1 @@ -3.9.1.12 \ No newline at end of file +3.9.1.13 \ No newline at end of file diff --git a/pilot/util/constants.py b/pilot/util/constants.py index 8a8d41ae..e90371e1 100644 --- a/pilot/util/constants.py +++ b/pilot/util/constants.py @@ -28,7 +28,7 @@ RELEASE = '3' # released number should be fixed at 3 for Pilot 3 VERSION = '9' # version number is '1' for first release, '0' until then, increased for bigger updates REVISION = '1' # revision number should be reset to '0' for every new version release, increased for small updates -BUILD = '12' # build number should be reset to '1' for every new development cycle +BUILD = '13' # build number should be reset to '1' for every new development cycle SUCCESS = 0 FAILURE = 1 diff --git a/pilot/util/container.py b/pilot/util/container.py index d4705c36..e5837d14 100644 --- a/pilot/util/container.py +++ b/pilot/util/container.py @@ -21,6 +21,7 @@ """Functions for executing commands.""" +import errno import os import subprocess import logging @@ -118,6 +119,12 @@ def read_output(stream, queue): except (AttributeError, ValueError): # Handle the case where stream is None (AttributeError) or closed (ValueError) break + except OSError as e: + if e.errno == errno.EBADF: + # Handle the case where the file descriptor is bad + break + else: + raise queue.put(line) @@ -145,8 +152,11 @@ def read_output(stream, queue): exit_code = process.poll() # Wait for the threads to finish reading - stdout_thread.join() - stderr_thread.join() + try: + stdout_thread.join() + stderr_thread.join() + except Exception as e: + logger.warning(f'exception caught in execute: {e}') # Read the remaining output from the queues while not stdout_queue.empty():