Fix launchctl bootstrap failures being discarded as XPC errors - #2045
Fix launchctl bootstrap failures being discarded as XPC errors#2045rogerneal wants to merge 1 commit into
Conversation
|
Thanks for picking this up @rogerneal, and for being clear about what you did and I checked out Three things I would raise: The commit is unsigned. I would split the domain change out. The issue proposes two fixes, and this PR If the domain change stays, the rest of the code may not agree with it. Two small ones while I am here: I think the core idea is okay, and it matches what |
f8d17d2 to
cde7f88
Compare
Surface launchctl exit status and stderr from ServiceManager.register instead of continuing into a misleading apiserver XPC error. Keep container system start idempotent when the service is already registered. The system-domain bootstrap change for root outside Aqua is intentionally left to a follow-up so this can merge on its own evidence. Fixes apple#2008
cde7f88 to
8b6f4c4
Compare
|
@singhible Thanks for the careful review. I took your suggestions:
Follow-up for the domain half is coming next, including the |
Summary
launchctl bootstrapexit status and stderr fromServiceManager.registerinstead of continuing into a misleading apiserver XPC error.container system startidempotent when the service is already registered.launchctlfailure path for error surfacing.The system-domain bootstrap change for root outside Aqua is intentionally left to a follow-up PR so this half can merge on its own evidence.
Fixes #2008
Test plan
Tested
swift test --filter ServiceManagerTests(5 tests, all passing after rebase)launchctlfailure viaServiceManager.registerwith a missing plist; error includeslaunchctl bootstrapand statussystem start:register()loadedcom.apple.container.apiserverand the process startedNot in this PR
systemdomain (follow-up)macos-26Background / non-loginsudo container system startreproduction