Add WITNESS_WARN() to getenv() to explicitly note that the function may
sleep. This helps to expose bugs when the requested environment variable doesn't exist.
This commit is contained in:
parent
f93ef5516b
commit
816c203937
@ -310,6 +310,7 @@ getenv(const char *name)
|
||||
int len;
|
||||
|
||||
if (dynamic_kenv) {
|
||||
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv");
|
||||
mtx_lock(&kenv_lock);
|
||||
cp = _getenv_dynamic(name, NULL);
|
||||
if (cp != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user