I have a script that exports an environment variable and runs some indexes.
export LOGLEVEL="1" /home/myuser/bin/myscript1.sh /home/myuser/bin/myscript2.sh
LOGLEVELavailable to start processes from indexes. How to change an environment variable LOGLEVEL?
LOGLEVEL
I tried to set the variable with export LOGLEVEL="5", but this does not work.
export LOGLEVEL="5"
In general, you can only affect process environment variables during the start of a process. If you need to report changes to an ongoing process, the environment is not a suitable tool.
, .
: - , LOGLEVEL, SIGHUP SIGHUP.
linux:
strings –a /proc/<pid_of_the_process>/environ
ps eww <pid_of_the_process>