Skip to content

Commit ab0b3f5

Browse files
Merge pull request #67 from DataKitchen/release/5.33.3
Release/5.33.3
2 parents 82d4828 + 4297e6f commit ab0b3f5

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
88

99
[project]
1010
name = "dataops-testgen"
11-
version = "5.33.2"
11+
version = "5.33.3"
1212
description = "DataKitchen's Data Quality DataOps TestGen"
1313
authors = [
1414
{ "name" = "DataKitchen, Inc.", "email" = "info@datakitchen.io" },

testgen/__main__.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,16 @@ def _install_shutdown_handler(handler) -> None:
146146

147147

148148
def _forward_signal_to_child(child: subprocess.Popen, signum: int) -> None:
149-
# POSIX: forward the signal verbatim. Windows: send CTRL_BREAK_EVENT so the
150-
# child's atexit hooks run (it deregisters from pgserver's PID list, lets
151-
# streamlit/uvicorn shut down their event loops, etc.). The child must have
152-
# been spawned with CREATE_NEW_PROCESS_GROUP — see _subprocess_spawn_kwargs.
149+
# POSIX: forward the signal verbatim. Windows: TerminateProcess — graceful
150+
# CTRL_BREAK_EVENT delivery is unreliable here because some children
151+
# (notably the scheduler thread blocked in threading.Event.wait, and
152+
# Streamlit/tornado) don't wake on SIGBREAK, leaving the parent's
153+
# children-watcher loop hung forever. Force-kill is safe: children no
154+
# longer call pgserver.get_server(), so there's no on-disk PID registry
155+
# state to clean up — only the parent owns the pgserver handle and
156+
# exits via the normal atexit path.
153157
if sys.platform == "win32":
154-
child.send_signal(signal.CTRL_BREAK_EVENT)
158+
child.terminate()
155159
else:
156160
child.send_signal(signum)
157161

0 commit comments

Comments
 (0)