diff options
| author | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-11-25 20:08:02 +0000 |
|---|---|---|
| committer | Theofilos Augoustis <theofilos.augoustis@gmail.com> | 2025-11-25 20:08:02 +0000 |
| commit | e5d9a84e85a3dd048178220b15c5d6f83bb94164 (patch) | |
| tree | abd5c2c639561c826c5d1cdd7c320add09a67fa3 /run.py | |
| parent | 737f76fed14890cb6dd25b607bb90bd4deefa34e (diff) | |
| download | focaccia-e5d9a84e85a3dd048178220b15c5d6f83bb94164.tar.gz focaccia-e5d9a84e85a3dd048178220b15c5d6f83bb94164.zip | |
Remove ignore logic
Diffstat (limited to 'run.py')
| -rw-r--r-- | run.py | 52 |
1 files changed, 17 insertions, 35 deletions
diff --git a/run.py b/run.py index 97dd38f..2763555 100644 --- a/run.py +++ b/run.py @@ -26,9 +26,6 @@ class Scheduler: self.debugger.traceFork() self.debugger.traceExec() - self._first_clone_ignored = True - self._ignored_tid = None - if os.path.exists(sched_socket_path): os.unlink(sched_socket_path) @@ -81,42 +78,27 @@ class Scheduler: parent = child.parent child_tid = child.pid - if not self._first_clone_ignored: - self._first_clone_ignored = True - self._ignored_tid = child_tid - - print(f"First clone: created TID {child_tid} — IGNORING it") - - # Detach ignored child so it runs untraced - child.detach() - - # Remove from debugger - self.debugger.deleteProcess(child) - - # Resume parent so clone() completes - parent.syscall() - else: - # LATER clones are traced - print(f"New traced thread {child_tid} (parent {parent.pid})") + # LATER clones are traced + print(f"New traced thread {child_tid} (parent {parent.pid})") - # Arm both child and parent again + # Arm both child and parent again + try: + child.syscall() + except Exception as e: + print(f"Error arming child {child_tid}: {e}") try: - child.syscall() - except Exception as e: - print(f"Error arming child {child_tid}: {e}") - try: - self.debugger.deleteProcess(child) - except Exception: - pass + self.debugger.deleteProcess(child) + except Exception: + pass + try: + parent.syscall() + except Exception as e: + print(f"Error arming parent {parent.pid}: {e}") try: - parent.syscall() - except Exception as e: - print(f"Error arming parent {parent.pid}: {e}") - try: - self.debugger.deleteProcess(parent) - except Exception: - pass + self.debugger.deleteProcess(parent) + except Exception: + pass def _handle_exit(self, event: ProcessExit): dead_proc: PtraceProcess = event.process |