Top "Getenv" questions

Anything related to C or C++ standard library functions `getenv` (C) or `std::getenv` (C++). These functions are used to get the value of an environment variable.

Updated environment variable but os.getenv() keeps returning None

I can't seem to get my code to respond to custom environmental variables so I wrote a piece of code …

python python-3.x getenv
os.getenv returns None instead correct value

I have a complex piece of software I am not able to post, nor do I have a concrete working …

python linux environment-variables getenv
Standard C usage of getenv and safe practices

I am trying to write C code which makes use of some ENV variables in a UNIX environment. The question …

c unix environment-variables getenv
C++ no 'object' file generated

This is some code to get an environment variable from inside Qt, however, it seems Qt's QProcessEnvironment::systemEnvironment() only reflect …

c++ qt getenv
How do I use putenv() to update existing environment variable?

Edit: as far as I can tell, my question is because of a defect in PHP. I've copied this question …

php environment-variables getenv
Writing own Unix shell in C - Problems with PATH and execv

I'm writing my own shell in C. It needs to be able to display the users current directory, execute commands …

c shell unix execv getenv
"getenv... function ... may be unsafe" - really?

I'm using MSVC to compile some C code which uses standard-library functions, such as getenv(), sprintf and others, with /W3 …

visual-c++ compiler-warnings crt getenv c-standard-library
What can I do if getcwd() and getenv("PWD") don't match?

I have a build system tool that is using getcwd() to get the current working directory. That's great, except that …

c macos makefile getcwd getenv
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

I was learning C with a book called "C in Linux" by David Haskins but there's a problem. When i …

c compiler-errors warnings strncpy getenv