Hacker News new | past | comments | ask | show | jobs | submit login

In typical Linux setups, cmdline is world-readable, but environ is not. So you never should put secrets in cmdline, but they are ok to be in environ. And that is pretty much the only difference between the two.



The environment is inherited by child processes. I think that is a very important difference.


Of the relevant Linux syscalls neither fork or clone touch argv or environ at all, on the other hand execve requires passing both argv and envp explicitly




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: