Fix dangerous pkill, circular import, and dedup _res_suffix

- Scope pkill to 'pdal pipeline' (avoids killing unrelated PDAL jobs)
- Inline _strip_lidar_ext in dtm.py to remove circular import from pipeline
- _res_suffix_str now delegates to LidarArchaeoPipeline._res_suffix
This commit is contained in:
Antoine Jacquin
2026-09-07 21:21:57 +02:00
parent d27b92a26a
commit cd5bf54066
3 changed files with 16 additions and 8 deletions

View File

@ -396,8 +396,10 @@ def main():
def _kill_orphan_pdal(signum=None, frame=None):
"""Kill orphan PDAL processes on interrupt or exit."""
import subprocess
# Belt-and-suspenders: os.killpg below is the primary mechanism.
# This handles the edge case where a child escapes the process group.
try:
subprocess.run(["pkill", "-9", "-f", "pdal"], capture_output=True, timeout=3)
subprocess.run(["pkill", "-9", "-f", "pdal pipeline"], capture_output=True, timeout=3)
except Exception:
pass
if signum is not None: