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

Restart required for deleted variables #11

Closed
dwinfield opened this Issue Jun 17, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@dwinfield

dwinfield commented Jun 17, 2015

Although changes to the variables are picked up when an app using that variable is restarted, if a variable is deleted, a restart of the computer is required.

@hschmidt

This comment has been minimized.

Show comment
Hide comment
@hschmidt

hschmidt Jan 1, 2017

Owner

I can reproduce this.

Owner

hschmidt commented Jan 1, 2017

I can reproduce this.

@hschmidt hschmidt added the bug label Jan 1, 2017

@hschmidt

This comment has been minimized.

Show comment
Hide comment
@hschmidt

hschmidt Jan 3, 2017

Owner

This happens on 10.10 and newer where a reimplementation of launchd breaks the unsetenv functionality. The corresponding API still exists in the reimplementation, and I assume attempts to emulate the legacy implementation; but evidently it is broken. Interestingly, launchctl unsetenv works because it isn't using the emulated legacy API but the new XPC-based API. To fix we need to reverse-engineer the new API—it is undocumented—and use it instead of relying on the emulation.

Owner

hschmidt commented Jan 3, 2017

This happens on 10.10 and newer where a reimplementation of launchd breaks the unsetenv functionality. The corresponding API still exists in the reimplementation, and I assume attempts to emulate the legacy implementation; but evidently it is broken. Interestingly, launchctl unsetenv works because it isn't using the emulated legacy API but the new XPC-based API. To fix we need to reverse-engineer the new API—it is undocumented—and use it instead of relying on the emulation.

@hschmidt hschmidt closed this in 3c4f0fc Jan 3, 2017

hschmidt added a commit that referenced this issue Jan 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment