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).
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]);
