Page MenuHomeFreeBSD

Update getenv(9) manpage to reflect the new world order
Needs ReviewPublic

Authored by davide on Oct 17 2014, 5:42 PM.


Group Reviewers

r273174 renames in-kernel version of getenv/setenv to kern_setenv/kern_getenv.
This commit updates the manpage accordingly.

Diff Detail

Lint Skipped
Unit Tests Skipped

Event Timeline

davide updated this revision to Diff 2023.Oct 17 2014, 5:42 PM
davide retitled this revision from to Update getenv(9) manpage to reflect the new world order.
davide updated this object.
davide edited the test plan for this revision. (Show Details)
davide added reviewers: Doc Committers, jhb.
davide added a subscriber: markj.
jhb edited edge metadata.Oct 17 2014, 6:44 PM

The manpage changes are ok, but I'm not a huge fan of this change in general. You have kern_getenv(), but the rest of the functions are getenv*() so that is confusing. Also, there is a userland unsetenv(3), yet you didn't rename the kernel unsetenv(), so the change isn't complete either. :(

I would rather find another way to solve this problem if possible then obfuscating all of the kernel source code. sys_foo() was annoying but tolerable-ish, but this is much more annoying. These routines at least have very similar semantics (and getenv() has the same API/ABI). How are you handling malloc() and free()? Those seem like a much larger problem (and renaming those would also be far more invasive and something I would oppose).

unsetenv is not used anywhere in the kernel -- just in the loader. As you may see the loader code was unchanged.
Do you have an alternative to handle the whole thing in your mind?

emaste added a subscriber: emaste.Dec 31 2015, 7:21 PM