Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions task-sdk/src/airflow/sdk/execution_time/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import sys
import threading
import time
import warnings
import weakref
from collections import deque
from collections.abc import Callable, Generator
Expand Down Expand Up @@ -477,6 +478,13 @@ def start(
# Open the socketpair before forking off the child, so that it is open when we fork.
child_logs, read_logs = socketpair()

# Prevent on console:
# DeprecationWarning: This process (pid=NNN) is multi-threaded, use of fork() may lead to deadlocks in the child.
warnings.filterwarnings(
"ignore",
module="airflow.sdk.execution_time.supervisor",
message=".*use of fork() may lead to deadlocks in the child.",
)
pid = os.fork()
if pid == 0:
# Close and delete of the parent end of the sockets.
Expand Down