Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 52c2aab

Browse files
enh-googleGerrit Code Review
authored andcommitted
Merge "Fix posix_spawn()/posix_spawnp() nullability annotations." into main
2 parents d471b7a + 2229e55 commit 52c2aab

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libc/include/spawn.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5255
typedef struct __posix_spawnattr* posix_spawnattr_t;
5356
typedef 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

5861
int posix_spawnattr_init(posix_spawnattr_t _Nullable * _Nonnull __attr) __INTRODUCED_IN(28);
5962
int posix_spawnattr_destroy(posix_spawnattr_t _Nonnull * _Nonnull __attr) __INTRODUCED_IN(28);

0 commit comments

Comments
 (0)