Page MenuHomeFreeBSD

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

Authored by davide on Oct 17 2014, 5:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 2:18 PM
Unknown Object (File)
Tue, Apr 2, 10:36 PM
Unknown Object (File)
Tue, Apr 2, 10:05 PM
Unknown Object (File)
Mar 2 2024, 12:57 PM
Unknown Object (File)
Feb 20 2024, 2:18 PM
Unknown Object (File)
Dec 19 2023, 11:14 PM
Unknown Object (File)
Dec 3 2023, 11:53 AM
Unknown Object (File)
Nov 10 2023, 4:57 AM
Subscribers

Details

Reviewers
jhb
Group Reviewers
manpages
Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

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.

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?