diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-11-24 17:06:42 +0000 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-11-24 17:06:42 +0000 |
| commit | beff1e36ad067299be1c7e756e88cb388ce318e6 (patch) | |
| tree | 37de0f52af5d58fedb1bd7348c1c3bdfb7b64bec /run.py | |
| parent | 272f780033107960cb144302f64bb7504c45ea07 (diff) | |
| download | focaccia-beff1e36ad067299be1c7e756e88cb388ce318e6.tar.gz focaccia-beff1e36ad067299be1c7e756e88cb388ce318e6.zip | |
Correctly communicate TIDs to run.py
Diffstat (limited to '')
| -rw-r--r-- | run.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/run.py b/run.py index d8cedcd..82be8e3 100644 --- a/run.py +++ b/run.py @@ -2,7 +2,6 @@ import os import signal import socket import subprocess -import sys import select import ptrace.debugger @@ -33,12 +32,12 @@ def schedule_next_nonblocking(sock, processes, current_proc): if not r: return current_proc # no input → continue with current - data = sock.recv(64) + data = sock.recv(8) if not data: return current_proc try: - tid = int(data.strip()) + tid = int.from_bytes(data, byteorder='little', signed=False) except ValueError: print(f"Scheduler: invalid data {data!r}") return current_proc |