[PR #909] SPIRV-TOOL-TREE-CLEANUP: rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp #947

Open
opened 2026-11-26 20:19:35 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/909
Author: @markankamaransheogarat-sys
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: ubiq/spirv-tool-tree-cleanup


📝 Commits (2)

  • f6230a5 rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp
  • 317b04f rdna2spirv: preserve subprocess.run patchability and forward timeout/env in _run_tool

📊 Changes

3 files changed (+175 additions, -2 deletions)

View changed files

📝 make_game.py (+17 -0)
📝 tests/test_make_game_translate_cleanup.py (+95 -0)
📝 tools/rdna2spirv.py (+63 -2)

📄 Description

Summary

  • Replace subprocess.run in _run_spirv_tool() with _run_tool() using Popen + terminate()/kill() on BaseException (SIGINT/SIGTERM) so orphaned spirv-as/spirv-val children are cleaned up.
  • Install a SIGTERM handler in rdna2spirv.main() and sweep leftover .spirv-*.tmp staging files on make_game.translate() abort and after rdna2spirv merge/single-run completion.

Verification

  • python3 -I tests/test_make_game_translate_cleanup.py: 7/7 passed.

AI-assisted: yes (synthetic tests only, no game files).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/909 **Author:** [@markankamaransheogarat-sys](https://github.com/markankamaransheogarat-sys) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `ubiq/spirv-tool-tree-cleanup` --- ### 📝 Commits (2) - [`f6230a5`](https://github.com/ubiquitarianism/leonida/commit/f6230a5cc7b3f656104110d53d249c2052f185f2) rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp - [`317b04f`](https://github.com/ubiquitarianism/leonida/commit/317b04f3df9e23927edbf336e7c3c1c62d335430) rdna2spirv: preserve subprocess.run patchability and forward timeout/env in _run_tool ### 📊 Changes **3 files changed** (+175 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `make_game.py` (+17 -0) 📝 `tests/test_make_game_translate_cleanup.py` (+95 -0) 📝 `tools/rdna2spirv.py` (+63 -2) </details> ### 📄 Description ### Summary - Replace `subprocess.run` in `_run_spirv_tool()` with `_run_tool()` using `Popen` + `terminate()`/`kill()` on `BaseException` (SIGINT/SIGTERM) so orphaned `spirv-as`/`spirv-val` children are cleaned up. - Install a `SIGTERM` handler in `rdna2spirv.main()` and sweep leftover `.spirv-*.tmp` staging files on `make_game.translate()` abort and after `rdna2spirv` merge/single-run completion. ### Verification - `python3 -I tests/test_make_game_translate_cleanup.py`: 7/7 passed. AI-assisted: yes (synthetic tests only, no game files). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#947
No description provided.