Describe the bug
Redis will clear /proc/PID/environ in setproctitle. The content for redis server process's /proc/PID/environ is empty by default.
To reproduce
1. clone the repo
2. make
3. ./src/redi-server
4. ps -ef | grep server to get the PID
5. cat /proc/PID/environ
6.
Expected behavior
/proc/PID/environ should not be emptyed or we should add a macro to control whether we want to enable setproctitle feature.
Additional information
Any additional information that is relevant to the problem.
Comment From: oranagra
redis 6.2 has a config that let's you disable this (set-proc-title).
can you please also describe what problems does that cause for you? i.e. not the fact that it's missing, but why is that problematic..
Comment From: andyxning
We have a core dump handler that needs to read process environ from /proc/PID/environ.
Comment From: andyxning
Close this in favor of https://github.com/redis/redis/pull/3623. Actually we add a macro to control whether we need to enable setproctitle behavior.