Is there a way to change the environment variables of another process in Unix?

后端 未结 11 2247
别跟我提以往
别跟我提以往 2020-11-22 15:09

On Unix, is there any way that one process can change another\'s environment variables (assuming they\'re all being run by the same user)? A general solution would be best,

11条回答
  •  再見小時候
    2020-11-22 15:36

    Or get your process to update a config file for the new process and then either:

    • perform a kill -HUP on the new process to reread the updated config file, or
    • have the process check the config file for updates every now and then. If changes are found, then reread the config file.

提交回复
热议问题