Restart required for deleted variables #11

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

Projects

None yet

2 participants

@dwinfield

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
Owner
hschmidt commented Jan 1, 2017

I can reproduce this.

@hschmidt hschmidt added the bug label Jan 1, 2017
@hschmidt
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 hschmidt added a commit that referenced this issue Jan 4, 2017
@hschmidt Fix: Can’t unset variables with legacy API (connected to #11)
Regression introduced in 3c4f0fc.
411da8d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment