@@ -46,14 +46,17 @@ __BEGIN_DECLS
4646#define POSIX_SPAWN_USEVFORK 64
4747#define POSIX_SPAWN_SETSID 128
4848#endif
49- // mark all fds (except stdin/out/err) as close-on-exec prior to executing registered file actions
49+ /**
50+ * Used with posix_spawnattr_setflags() to mark all fds except
51+ * stdin/stdout/stderr as O_CLOEXEC prior to executing registered file actions.
52+ */
5053#define POSIX_SPAWN_CLOEXEC_DEFAULT 256
5154
5255typedef struct __posix_spawnattr * posix_spawnattr_t ;
5356typedef struct __posix_spawn_file_actions * posix_spawn_file_actions_t ;
5457
55- int posix_spawn (pid_t * _Nullable __pid , const char * _Nonnull __path , const posix_spawn_file_actions_t _Nullable * _Nullable __actions , const posix_spawnattr_t _Nullable * _Nullable __attr , char * const _Nonnull __argv [_Nonnull ], char * const _Nullable __env [_Nullable ]) __INTRODUCED_IN (28 );
56- int posix_spawnp (pid_t * _Nullable __pid , const char * _Nonnull __file , const posix_spawn_file_actions_t _Nullable * _Nullable __actions , const posix_spawnattr_t _Nullable * _Nullable __attr , char * const _Nonnull __argv [_Nonnull ], char * const _Nullable __env [_Nullable ]) __INTRODUCED_IN (28 );
58+ int posix_spawn (pid_t * _Nullable __pid , const char * _Nonnull __path , const posix_spawn_file_actions_t _Nullable * _Nullable __actions , const posix_spawnattr_t _Nullable * _Nullable __attr , char * const _Nullable __argv [_Nullable ], char * const _Nullable __env [_Nullable ]) __INTRODUCED_IN (28 );
59+ int posix_spawnp (pid_t * _Nullable __pid , const char * _Nonnull __file , const posix_spawn_file_actions_t _Nullable * _Nullable __actions , const posix_spawnattr_t _Nullable * _Nullable __attr , char * const _Nullable __argv [_Nullable ], char * const _Nullable __env [_Nullable ]) __INTRODUCED_IN (28 );
5760
5861int posix_spawnattr_init (posix_spawnattr_t _Nullable * _Nonnull __attr ) __INTRODUCED_IN (28 );
5962int posix_spawnattr_destroy (posix_spawnattr_t _Nonnull * _Nonnull __attr ) __INTRODUCED_IN (28 );
0 commit comments