Skip to content

[DNM] macos: read the command line of each process - #28

Draft
LalitMaganti wants to merge 1 commit into
macos-record-1from
macos-record-2
Draft

LalitMaganti wants to merge 1 commit into
macos-record-1from
macos-record-2

Conversation

@LalitMaganti

@LalitMaganti LalitMaganti commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Prototype for #2, step 2 of 6, on top of #34.

The kernel trace does not carry command lines, so each execution's arguments are read from the process itself as soon as its execution appears. A read can land while the new image is still being set up, so it is retried; and a pid can already have been reused, so the process must not have started later than the execution it is claimed for. Anything still unread is named after its program, and how many is reported.

The kernel trace does not carry command lines, so each execution's
arguments are read from the process itself, as soon as its execution
appears in the trace.

Two things make that unreliable on their own. A read can land while the
new image is still being set up, which fails, so it is retried. And a pid
can already have been reused by another process, whose command line would
otherwise be attached to this one, so the process must not have started
later than the execution. Anything still unread is named after its
program, and how many is reported.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant