Skip to content

SMJobBless buggy? #10

@evanlooij

Description

@evanlooij

I've been running SMJobBlessXPC, without the sandbox, but with code-signing and I noticed a pattern. The first time the blessing would work and I would see:

Helper available.
Sending request: Hi there, helper service.
Received response: Hi there, host application!

Quitting SMJobBlessApp and starting it again, without any changes to the code, I would get the dreaded:

Failed to bless helper. Error: Error Domain=CFErrorDomainLaunchd Code=2 “(null)"

Repeating this, running the App, quitting, running it again, the pattern became clear, especially when I used LaunchControl.app to monitor the status of /Library/PrivilegedHelperTools/com.apple.bsd.SMJobBlessHelper:

Status SMJobBlessHelper result SMJobBless()
unloaded YES (will load SMJobBlessHelper)
loaded NO (will unload SMJobBlessHelper)

So, who's to blame? The docs for SMJobBless() state:

If the job is already installed, success is returned.

My tests seem to indicate otherwise, unless there's something I'm missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions