Skip to content

fix(services): properly parse launchctl output for status detection#21

Open
jhult wants to merge 1 commit into
neul-labs:mainfrom
jhult:fix/services-info
Open

fix(services): properly parse launchctl output for status detection#21
jhult wants to merge 1 commit into
neul-labs:mainfrom
jhult:fix/services-info

Conversation

@jhult
Copy link
Copy Markdown
Contributor

@jhult jhult commented May 26, 2026

The status check was using naive string matching on the launchctl list output instead of parsing the actual PID field. This caused services to incorrectly report as running when they were only loaded. Now properly checks the PID column where "-" indicates a stopped service and a numeric PID indicates running.

feat(services): add detailed status info like brew services

Display Running, Loaded, and Schedulable fields to match brew services info output. Schedulable indicates whether a stopped service is in a clean state (status 0) ready to be scheduled. Also fixed handling of services that have files but aren't loaded into launchd—these now correctly show as stopped rather than unknown.

The status check was using naive string matching on the launchctl list output instead of parsing the actual PID field. This caused services to incorrectly report as running when they were only loaded. Now properly checks the PID column where "-" indicates a stopped service and a numeric PID indicates running.

feat(services): add detailed status info like brew services

Display Running, Loaded, and Schedulable fields to match brew services info output. Schedulable indicates whether a stopped service is in a clean state (status 0) ready to be scheduled. Also fixed handling of services that have files but aren't loaded into launchd—these now correctly show as stopped rather than unknown.
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