From ac3bc1133266498b5d9d963dcd245cb44a9f6fd0 Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 8 May 2026 00:04:48 -0400 Subject: [PATCH] Add per-actor `setproctitle` via `devx._proctitle` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New `tractor.devx._proctitle` mod sets each sub-actor's `argv[0]` (and kernel `comm`) to `tractor[]` — e.g. `tractor[doggy@1027301b]` — so `ps`/`top`/`htop` and `acli.pytree`/reaper tooling can identify actors at a glance without parsing full cmdlines. Deats, - `set_actor_proctitle()` wraps the `setproctitle` pkg with `ImportError` guard; optional at runtime but listed in `pyproject.toml` so default installs benefit. - called early in `_child._actor_child_main()` after `Actor` construction, before `_trio_main()` entry. - tests in `tests/devx/test_proctitle.py`: format unit test, `/proc/{cmdline,comm}` integration test, negative detection test. Resolves #457 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code (cherry picked from commit d60245777e5c5cc5f794c12edc0fbcc0790b135b) --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ebaa7459..af67752d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,10 +43,8 @@ dependencies = [ "tricycle>=0.4.1,<0.5", "wrapt>=1.16.0,<2", "colorlog>=6.8.2,<7", - # built-in multi-actor `pdb` REPL "pdbp>=1.8.2,<2", # windows only (from `pdbp`) - # typed IPC msging "msgspec>=0.20.0", "bidict>=0.23.1",