diff --git a/src/util/os_misc.h b/src/util/os_misc.h index 6a619c158b5..03cd59c3683 100644 --- a/src/util/os_misc.h +++ b/src/util/os_misc.h @@ -83,7 +83,8 @@ os_log_message(const char *message); /* - * Get an option. Should return NULL if specified option is not set. + * Get an option(environment variable or os property) in a platform independent way. + * Should return NULL if specified option for @name is not set. * It has the same disadvantage as getenv, see * https://wiki.sei.cmu.edu/confluence/display/c/ENV34-C.+Do+not+store+pointers+returned+by+certain+functions */ @@ -101,7 +102,8 @@ char * os_get_option_dup(const char *name); /* - * Get an option. Should return NULL if specified option is not set. + * Get an option(environment variable or os property) in a platform independent way. + * Should return NULL if specified option for @name is not set. * Same as `os_get_option()` but uses `secure_getenv()` instead of `getenv()` */ const char * @@ -118,12 +120,13 @@ char * os_get_option_secure_dup(const char *name); /* - * Get an option. Should return NULL if specified option is not set. + * Get an option(environment variable or os property) in a platform independent way. + * Should return NULL if specified option for @name is not set. * It's will save the option into hash table for the first time, and * for latter calling, it's will return the value comes from hash table * directly, and the returned value will always be valid before program exit - * The disadvantage is that setenv, unsetenv, putenv won't take effect - * after this function is called + * The disadvantage is that os_set_option won't take effect after this + * function is called */ const char * os_get_option_cached(const char *name);