mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-10-01 03:43:42 +08:00
Custom setproctitle (#32667)
* add custom setproctitle * add test * Update poetry.lock * fix lint * support only Linux * test only Linux * final lint * Update test_setproctitle.py * Update setproctitle.py * convert to threadnames * delete proctitles * Check str len and use PR_GET_NAME * fix poetry.lock * lint fix * Update common/threadname.py --------- Co-authored-by: reddyn12 <nikhilr.ssm@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ from collections.abc import Callable, ValuesView
|
||||
from abc import ABC, abstractmethod
|
||||
from multiprocessing import Process
|
||||
|
||||
from setproctitle import setproctitle
|
||||
from openpilot.common.threadname import setthreadname
|
||||
|
||||
from cereal import car, log
|
||||
import cereal.messaging as messaging
|
||||
@@ -27,7 +27,7 @@ def launcher(proc: str, name: str) -> None:
|
||||
mod = importlib.import_module(proc)
|
||||
|
||||
# rename the process
|
||||
setproctitle(proc)
|
||||
setthreadname(proc)
|
||||
|
||||
# create new context since we forked
|
||||
messaging.context = messaging.Context()
|
||||
|
||||
Reference in New Issue
Block a user