Is there any way, short of rebooting, to force launchd
to re-read environment variables newly defined in /etc/launchd.conf
?
Can it be done with launchctl(1)
?
launchd
Is there any way, short of rebooting, to force launchd
to re-read environment variables newly defined in /etc/launchd.conf
?
Can it be done with launchctl(1)
?
Best Answer
There is no way to do this, "launchd" is the master process, the equivalent of "init" in other unix systems, the only way in any other daemon would be to perform some sort of kill -HUP to reload config files etc, but this operation is not permitted on launchd. If you look it up in the process table it is the number 1 process, every other process that is currently running is in some way a child of it, so a reboot is the only way to achieve this. You may have further luck in setting those environment variables in another area that is more inclined to allow restarts.
EDIT:
Of course, missing the obvious solution that you can add the relevant variables into the config file, and then just run the commands manually in order to escape the need for a reboot, nothing that only newly start programs will take account of any changes. I found this page which explains it in more detail: