darkwing: row 100 round 1 packet, git socket hardening and refusal tests on 8e0fbca4 (#1594)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-13 11:55:33 -05:00
co-authored by Claude Opus 5.5
parent a50c9d23ae
commit ac430b5cfb
7 changed files with 1276 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# python3 run.py <seconds> <log> <cmd...>: runs cmd in its own session, kills
# the whole group on timeout and sweeps it after a normal exit. Exit 124 on
# timeout, else the command's code.
import os, signal, subprocess, sys
secs, log, cmd = int(sys.argv[1]), sys.argv[2], sys.argv[3:]
with open(log, "w") as out:
p = subprocess.Popen(cmd, stdout=out, stderr=subprocess.STDOUT, start_new_session=True)
try:
rc = p.wait(timeout=secs)
except subprocess.TimeoutExpired:
os.killpg(p.pid, signal.SIGKILL)
p.wait()
out.write(f"\nTIMEOUT after {secs} s\n")
rc = 124
try:
os.killpg(p.pid, signal.SIGKILL)
except ProcessLookupError:
pass
sys.exit(rc)