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.Exampleuser:~$ ps aux | grep grepuser   2349  0.0  0.0   4384   840 pts/1    S+   14:47   0:00 grep --color=auto grepThe 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/environbash: /proc/2349/environ: No such file or directoryThe 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?
How to get environmental variables of a very short process?
process;environment variables;proc
if you have stracestrace -v -e execve cmdIf the values of the variables are too long you can increase the string size with -sstrace -v -s 10000 -e execve cmd