How to change the environment of a running (parent) process under Linux?

This is not actually intended and there is no clean way to do it. However, it is possible to change an environment variable of an existing process using a debugger. Specifically, this is about the debugger called gdb. This can attach itself to existing processes and carry out various operations. Among other things, changing environment … Read more