fork(2), _Fork(), POSIX.1-2024, and AS-safety

Collin Funk collin.funk1@gmail.com
Sat May 17 18:11:38 GMT 2025


Hi Alejandro,

Alejandro Colomar <alx@kernel.org> writes:

> While updating the manual pages for POSIX.1-2024, I've realized about
> the existence of _Fork().  The GNU documentation says it's a GNU
> extension.  I guess it needs to be updated now that it's standard.
>
> I'll need to write a new manual page page for it, and change the
> existing ones to note that fork(2) isn't AS-safe.

Thank you for the reminder. I did this earlier this year in commit
ee33752b5d8c53eb5a357f67ab7ab6288fba5fd9:

    manual: Document functions adopted by POSIX.1-2024.
    
    Here is a patch updating the documentation to mention GNU and BSD
    extensions that were adopted by POSIX.1-2024.
    
    * manual/llio.texi (Memory-mapped I/O): Add that MAP_ANON and
    MAP_ANONYMOUS were added by POSIX.1-2024.
    * manual/memory.texi (Changing Block Size): Mention that reallocarray
    was added by POSIX.1-2024.
    * manual/message.texi (Message Translation): Adjust wording to match
    standardization.
    (Translation with gettext): Mention the gettext family of functions were
    added by POSIX.1-2024.
    * manual/pattern.texi (Wildcard Matching): Mention that FNM_CASEFOLD was
    added by POSIX.1-2024.
    * manual/process.texi (Creating a Process): Mention that _Fork and
    WCOREDUMP were added by POSIX.1-2024.
    * manual/signal.texi (Miscellaneous Signals): Mention that SIGWINCH was
    added by POSIX-1.2024.
    * manual/startup.texi (Environment Access): Mention that secure_getenv
    was added by POSIX.1-2024.
    * manual/string.texi (Truncating Strings): Mention that strlcpy,
    strlcat, wcslcpy, and wslcat were added by POSIX-1.2024.
    (Search Functions): Document that memmem was added by POSIX-1.2024.
    * manual/terminal.texi (Allocation): Mention that ptsname_r was added by
    POSIX-1.2024.
    * manual/threads.texi (Waiting with Explicit Clocks): Move node under
    POSIX Threads.  Mention pthread_cond_clockwait,
    pthread_rwlock_clockrdlock, and pthread_rwlock_clockwrlock were added by
    POSIX-1.2024.
    (Joining Threads): New node under Non-POSIX Extensions.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Signed-off-by: Collin Funk <collin.funk1@gmail.com>

And in commit 93623c03d527dcec76694ab0fcc197193922d1a8 updated getdelim
and getline which were added by POSIX.1-2008 based on the GNU extension:

    manual: Update standardization of getline and getdelim [BZ #32830]
    
    * manual/stdio.texi (Line Input): Document that getline and getdelim
    where GNU extensions until standardized in POSIX.1-2008.  Add restrict
    to function prototypes.
    
    Signed-off-by: Collin Funk <collin.funk1@gmail.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Next time I will remember to remind you on linux-man@vger.kernel.org. I
would offer to do the patch myself, but I don't know roff. :)

Collin


More information about the Libc-alpha mailing list