Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMJobBless buggy? #10

Open
evanlooij opened this issue Aug 17, 2017 · 2 comments
Open

SMJobBless buggy? #10

evanlooij opened this issue Aug 17, 2017 · 2 comments

Comments

@evanlooij
Copy link

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.

@0wnrepo
Copy link

0wnrepo commented Aug 25, 2017

try launchd unload

@0wnrepo
Copy link

0wnrepo commented Sep 11, 2017

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

No branches or pull requests

2 participants