Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 19 Nov 2021 16:53:30 -0500
From: Rich Felker <>
	"Michael Kerrisk (man-pages)" <>
Subject: getsubopt error behavior documentation in man page

The getsubopt man page documents the return value on error as:

    Otherwise, -1 is returned and *valuep is the entire name[=value]

without mentioning that this is a nonstandard extension. A couple
times now this has been raised against musl libc, which does not
support the extension, and we looked into supporting it, but it looks
like it violates our criteria for not supporting extensions where
historical implementations have conflicting behavior, which POSIX's

    The value of *valuep when getsubopt() returns -1 is unspecified.
    Historical implementations provide various incompatible extensions
    to allow an application to access the suboption text that was not
    found in the keylistp array.


It's also not entirely clear that presence of the extension conforms
to the specified behavior.

Perhaps the text could be amended to something like:

    Otherwise, -1 is returned. In this case, the GNU C Library stores
    a pointer to the entire name[=value] string in *valuep as an
    extension; other implementations may differ in their behavior.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.