[libc-commits] [libc] [libc][docs] Add spawn.h POSIX header documentation (PR #186291)
via libc-commits
libc-commits at lists.llvm.org
Thu Mar 12 18:41:04 PDT 2026
https://github.com/kovan created https://github.com/llvm/llvm-project/pull/186291
Add YAML metadata for `spawn.h` listing all POSIX-mandated macros
(`POSIX_SPAWN_RESETIDS`, `POSIX_SPAWN_SETPGROUP`, `POSIX_SPAWN_SETSCHEDPARAM`,
`POSIX_SPAWN_SETSCHEDULER`, `POSIX_SPAWN_SETSID`, `POSIX_SPAWN_SETSIGDEF`,
`POSIX_SPAWN_SETSIGMASK`) and all 23 functions (`posix_spawn`, `posix_spawnp`,
`posix_spawn_file_actions_*`, `posix_spawnattr_*`).
Add `spawn` to `index.rst` and `CMakeLists.txt` `docgen_list`.
Verified with `python3 docgen.py spawn.h` — generates valid RST with correct POSIX links.
Partial fix for #122006
>From 887edf6d07abbe373bbae343568e399bf44b30f9 Mon Sep 17 00:00:00 2001
From: kovan <xaum.io at gmail.com>
Date: Fri, 13 Mar 2026 02:38:59 +0100
Subject: [PATCH] [libc][docs] Add spawn.h POSIX header documentation
Add YAML metadata for spawn.h listing all POSIX-mandated macros
(POSIX_SPAWN_RESETIDS, POSIX_SPAWN_SETPGROUP, POSIX_SPAWN_SETSCHEDPARAM,
POSIX_SPAWN_SETSCHEDULER, POSIX_SPAWN_SETSID, POSIX_SPAWN_SETSIGDEF,
POSIX_SPAWN_SETSIGMASK) and all 23 functions (posix_spawn, posix_spawnp,
posix_spawn_file_actions_*, posix_spawnattr_*).
Add spawn to index.rst and CMakeLists.txt docgen_list.
Partial fix for #122006
---
libc/docs/CMakeLists.txt | 1 +
libc/docs/headers/index.rst | 1 +
libc/utils/docgen/spawn.yaml | 63 ++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+)
create mode 100644 libc/utils/docgen/spawn.yaml
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index 68fe9fc545781..67a9e494712a2 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -58,6 +58,7 @@ if (SPHINX_FOUND)
# pthread
setjmp
signal
+ spawn
stdbit
stdio
stdlib
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 573c5d185f38a..2a860f22a0389 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -24,6 +24,7 @@ Implementation Status
search
setjmp
signal
+ spawn
stdbit
stdfix
stdio
diff --git a/libc/utils/docgen/spawn.yaml b/libc/utils/docgen/spawn.yaml
new file mode 100644
index 0000000000000..01d71e9e3d7e8
--- /dev/null
+++ b/libc/utils/docgen/spawn.yaml
@@ -0,0 +1,63 @@
+macros:
+ POSIX_SPAWN_RESETIDS:
+ in-latest-posix: ''
+ POSIX_SPAWN_SETPGROUP:
+ in-latest-posix: ''
+ POSIX_SPAWN_SETSCHEDPARAM:
+ in-latest-posix: ''
+ POSIX_SPAWN_SETSCHEDULER:
+ in-latest-posix: ''
+ POSIX_SPAWN_SETSID:
+ in-latest-posix: ''
+ POSIX_SPAWN_SETSIGDEF:
+ in-latest-posix: ''
+ POSIX_SPAWN_SETSIGMASK:
+ in-latest-posix: ''
+
+functions:
+ posix_spawn:
+ in-latest-posix: ''
+ posix_spawn_file_actions_addchdir:
+ in-latest-posix: ''
+ posix_spawn_file_actions_addclose:
+ in-latest-posix: ''
+ posix_spawn_file_actions_adddup2:
+ in-latest-posix: ''
+ posix_spawn_file_actions_addfchdir:
+ in-latest-posix: ''
+ posix_spawn_file_actions_addopen:
+ in-latest-posix: ''
+ posix_spawn_file_actions_destroy:
+ in-latest-posix: ''
+ posix_spawn_file_actions_init:
+ in-latest-posix: ''
+ posix_spawnattr_destroy:
+ in-latest-posix: ''
+ posix_spawnattr_getflags:
+ in-latest-posix: ''
+ posix_spawnattr_getpgroup:
+ in-latest-posix: ''
+ posix_spawnattr_getschedparam:
+ in-latest-posix: ''
+ posix_spawnattr_getschedpolicy:
+ in-latest-posix: ''
+ posix_spawnattr_getsigdefault:
+ in-latest-posix: ''
+ posix_spawnattr_getsigmask:
+ in-latest-posix: ''
+ posix_spawnattr_init:
+ in-latest-posix: ''
+ posix_spawnattr_setflags:
+ in-latest-posix: ''
+ posix_spawnattr_setpgroup:
+ in-latest-posix: ''
+ posix_spawnattr_setschedparam:
+ in-latest-posix: ''
+ posix_spawnattr_setschedpolicy:
+ in-latest-posix: ''
+ posix_spawnattr_setsigdefault:
+ in-latest-posix: ''
+ posix_spawnattr_setsigmask:
+ in-latest-posix: ''
+ posix_spawnp:
+ in-latest-posix: ''
More information about the libc-commits
mailing list