diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 15:19:34 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 15:19:34 -0400 |
| commit | 40411a6837620097efe2cf15f322f0526ae45385 (patch) | |
| tree | 1851b23dda57385a021f70aed67e0253e4bb17c4 /tools/guest-diag/pin_gr_stream.py | |
| parent | f737696b6ab728c4045517ae8341734f1ac3cc74 (diff) | |
| download | open-iov-40411a6837620097efe2cf15f322f0526ae45385.tar.gz open-iov-40411a6837620097efe2cf15f322f0526ae45385.zip | |
sema-svc: never apply swept-page releases with no live channel (guest boot corruption); tooling guards
Diffstat (limited to 'tools/guest-diag/pin_gr_stream.py')
| -rw-r--r-- | tools/guest-diag/pin_gr_stream.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/guest-diag/pin_gr_stream.py b/tools/guest-diag/pin_gr_stream.py index 22c202b..c1ef7b2 100644 --- a/tools/guest-diag/pin_gr_stream.py +++ b/tools/guest-diag/pin_gr_stream.py @@ -45,8 +45,11 @@ def install_and_start(): b64 = subprocess.run(["base64", "-w0"], stdin=f, capture_output=True, text=True).stdout cmd = ("echo '%s' | base64 -d > /tmp/guest_pin_stream.py; " - "[ -f /tmp/guest_pin_stream.pid ] && sudo kill " - "$(cat /tmp/guest_pin_stream.pid) 2>/dev/null; " + "if [ -f /tmp/guest_pin_stream.pid ]; then " + "p=$(cat /tmp/guest_pin_stream.pid 2>/dev/null); " + "[ -n \"$p\" ] && grep -q guest_pin_stream " + "/proc/$p/cmdline 2>/dev/null && sudo kill $p 2>/dev/null; " + "fi; " "sudo rm -f /tmp/guest_pin_stream.pid; " "sudo setsid nohup python3 /tmp/guest_pin_stream.py %d %d %s %s %s " ">/tmp/guest_pin_stream.log 2>&1 & sleep 2; " |
