This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch fix-tasksdk-subprocess-closing
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/fix-tasksdk-subprocess-closing 
by this push:
     new e07dd994fdb fixup! Ensure that Task SDK supervisor closes all its 
handles correctly.
e07dd994fdb is described below

commit e07dd994fdbb8cf5461276085f1b14fe56c9e0fb
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Thu Nov 21 18:59:38 2024 +0000

    fixup! Ensure that Task SDK supervisor closes all its handles correctly.
---
 task_sdk/src/airflow/sdk/execution_time/supervisor.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/task_sdk/src/airflow/sdk/execution_time/supervisor.py 
b/task_sdk/src/airflow/sdk/execution_time/supervisor.py
index 995477c075a..31f762c0a0c 100644
--- a/task_sdk/src/airflow/sdk/execution_time/supervisor.py
+++ b/task_sdk/src/airflow/sdk/execution_time/supervisor.py
@@ -140,7 +140,7 @@ def _reopen_std_io_handles(child_stdin, child_stdout, 
child_stderr):
         try:
             fd = handle.fileno()
             os.dup2(sock.fileno(), fd)
-            # dup2 creates another open copy of the fh, we can close the 
"socket" copy of it.
+            # dup2 creates another open copy of the fd, we can close the 
"socket" copy of it.
             sock.close()
         except io.UnsupportedOperation:
             if "PYTEST_CURRENT_TEST" in os.environ:
@@ -203,7 +203,7 @@ def _fork_main(
             sys.stdout.flush()
         with suppress(ValueError, OSError):
             sys.stderr.flush()
-        with suppress(ValueError, OSError, AttributeError):
+        with suppress(ValueError, OSError):
             last_chance_stderr.flush()
         os._exit(n)
 

Reply via email to