-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environ() returns multiple empty strings #680
Comments
This is really not enough detail to be actionable. The function is straight forward: Line 23 in 54b2b56
|
Thanks for taking the time to respond.
As you can see, it contains a lot of NUL bytes at the end of the file. Are you open to a Pull Request that makes |
Hrm wondering why chrome would do this? Not sure how to handle this. If env is defined to be NUL seperated strings, then technically returning an empty list is correct. |
You are right, quoting from https://manpages.ubuntu.com/manpages/trusty/en/man5/proc.5.html
I found stackoverflow post that says processes can overwrite their environment strings, for example by writing zeroes to hide them. From a practical standpoint, I don't think returning a bunch of empty strings is useful in any way. |
In this case I think procfs is handling this properly. The caller can easily skip empty strings and there might be some cases where you actually want to know if there are empty/overwritten env vars. |
Environ() returns a list of strings, but a lot of returned entries are the empty string instead of a valid environment variable in the form
A=B
.The text was updated successfully, but these errors were encountered: