|
|
Subscribe / Log in / New account

Race-free process creation in the GNU C Library

Race-free process creation in the GNU C Library

Posted Sep 5, 2023 9:10 UTC (Tue) by tlamp (subscriber, #108540)
Parent article: Race-free process creation in the GNU C Library

The command arguments name for file/path seem to be switched for pidfd_spawn and pidfd_spawnp?

As for posix_spawn the parameter name path is used (i.e., relative or absolute) and for posix_spawnp the parameter name file is used (i.e., a filename that is looked up through PATH environment variable).

See https://manpages.debian.org/bookworm/manpages-dev/posix_spawn.3.en.html.

So shouldn't the signatures look like:

    int pidfd_spawn(int *restrict pidfd,
                    const char *restrict path,
                    const posix_spawn_file_actions_t *restrict facts,
                    const posix_spawnattr_t *restrict attrp,
                    char *const argv[restrict],
                    char *const envp[restrict]);

    int pidfd_spawnp(int *restrict pidfd,
                     const char *restrict file,
                     const posix_spawn_file_actions_t *restrict facts,
                     const posix_spawnattr_t *restrict attrp,
                     char *const argv[restrict_arr],
                     char *const envp[restrict_arr]);


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds