mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
process_replay: capture process output (#29027)
* Add ProcessOutputProxy * Move launcher to its own field * Move ProcessOutputCapture to its own file * Return itself from __enter__ of OpenpilotPrefix * Integrate ProcessOutputCapture into process_replay * Add note about capture_output_store to README * ipykernel import is optional * Disable type checking for link_with_current_proc * Remove assertion * Decode outputs to utf-8 * read(self): return empty buf if its none * Fix type annotations * Replace fifo with regular file, to avoid hitting fifo size limit
This commit is contained in:
@@ -196,6 +196,7 @@ class NativeProcess(ManagerProcess):
|
||||
self.unkillable = unkillable
|
||||
self.sigkill = sigkill
|
||||
self.watchdog_max_dt = watchdog_max_dt
|
||||
self.launcher = nativelauncher
|
||||
|
||||
def prepare(self) -> None:
|
||||
pass
|
||||
@@ -210,7 +211,7 @@ class NativeProcess(ManagerProcess):
|
||||
|
||||
cwd = os.path.join(BASEDIR, self.cwd)
|
||||
cloudlog.info(f"starting process {self.name}")
|
||||
self.proc = Process(name=self.name, target=nativelauncher, args=(self.cmdline, cwd, self.name))
|
||||
self.proc = Process(name=self.name, target=self.launcher, args=(self.cmdline, cwd, self.name))
|
||||
self.proc.start()
|
||||
self.watchdog_seen = False
|
||||
self.shutting_down = False
|
||||
@@ -227,6 +228,7 @@ class PythonProcess(ManagerProcess):
|
||||
self.unkillable = unkillable
|
||||
self.sigkill = sigkill
|
||||
self.watchdog_max_dt = watchdog_max_dt
|
||||
self.launcher = launcher
|
||||
|
||||
def prepare(self) -> None:
|
||||
if self.enabled:
|
||||
@@ -242,7 +244,7 @@ class PythonProcess(ManagerProcess):
|
||||
return
|
||||
|
||||
cloudlog.info(f"starting python {self.module}")
|
||||
self.proc = Process(name=self.name, target=launcher, args=(self.module, self.name))
|
||||
self.proc = Process(name=self.name, target=self.launcher, args=(self.module, self.name))
|
||||
self.proc.start()
|
||||
self.watchdog_seen = False
|
||||
self.shutting_down = False
|
||||
|
||||
Reference in New Issue
Block a user