Skip to content

Add Windows (MSYS2/Git Bash) support for process introspection#247

Open
mattmarcin wants to merge 1 commit into
kunchenguid:mainfrom
mattmarcin:windows-ps-portability
Open

Add Windows (MSYS2/Git Bash) support for process introspection#247
mattmarcin wants to merge 1 commit into
kunchenguid:mainfrom
mattmarcin:windows-ps-portability

Conversation

@mattmarcin

Copy link
Copy Markdown

MSYS2's ps has no -o flag, so firstmate's harness-ancestry walk (fm-lock.sh, fm-harness.sh) and pid fingerprint (fm-wake-lib.sh) fail with "ps: unknown option -- o" on Git Bash.

Add bin/fm-ps-portable.sh (fm_ps_field comm|args|ppid|identity): native ps -o on macOS/Linux, ps -f fallback where -o is unavailable - mirroring the existing stat -f/-c platform branch. Route the 9 ps -o sites through it and add tests/fm-ps-portable.test.sh.

No behavior change on macOS/Linux (native path is byte-identical).

MSYS2's `ps` has no `-o` flag, so firstmate's harness-ancestry walk
(fm-lock.sh, fm-harness.sh) and pid fingerprint (fm-wake-lib.sh) fail
with "ps: unknown option -- o" on Git Bash.

Add bin/fm-ps-portable.sh (fm_ps_field comm|args|ppid|identity): native
`ps -o` on macOS/Linux, `ps -f` fallback where `-o` is unavailable -
mirroring the existing stat -f/-c platform branch. Route the 9 ps -o
sites through it and add tests/fm-ps-portable.test.sh.

No behavior change on macOS/Linux (native path is byte-identical).
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