I have a very short process for which i want to check the environmental variables for debugging purposes. The process is instant from a human perspective. The example illustrates it better.
user:~$ ps aux | grep grep user 2349 0.0 0.0 4384 840 pts/1 S+ 14:47 0:00 grep --color=auto grep
The pid of the process was 2349. If I check the environmental variables (or other info):
#Pretty print of environmental variables# user:~$ xargs --null --max-args=1 echo < /proc/2349/environ bash: /proc/2349/environ: No such file or directory
The info has vanished with the process.
What to do before running the process to be able to list the variables once the precess is finished?