| Summary: | getprogname.3 misleading | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | dirk.meyer <dirk.meyer> |
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed After consulting with kib, the manpage is correct. The sentence you're citing means that calling setprogname() even though it is not needed on FreeBSD allows getprogname() implementations on other systems to retrieve and return the program name in any case. |
The manpage of getprogname seemms to contain an error. [...] In FreeBSD, the name of the program is set by the start-up code that is run before main(); thus, running setprogname() is not necessary. Pro- grams that desire maximum portability should still call it; on another operating system, these functions may be implemented in a portability library. Calling setprogname() allows the aforementioned library to learn the program name without modifications to the start-up code. [...] I think the last part should be: Calling getprogname() allows ... How-To-Repeat: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/getprogname.3 man getprogname