On 09/08/18 00:15, Eric Blake wrote: > Adding posix_spawn_file_actions_addchdir() is what avoids the need to > lock in the parent, because now you do:
A thought WRT the naming: while ..._addopen() can be called for more file descriptors, there's only one working directory for the spawned process. Therefore I suggest to simply call it posix_spawn_file_actions_chdir(), i.e., without the "add" in its name. To "remove" this from the posix_spawn_file_actions again (before calling posix_spawn, of course), one could also simply use posix_spawn_file_actions_chdir(NULL); WDYT? Have a nice day, Berny