Skip to content

Commit 47037ac

Browse files
committed
Add part of documentation
1 parent 98825bf commit 47037ac

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Doc/library/os.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5161,11 +5161,18 @@ written in Python, such as a mail server's external command delivery program.
51615161

51625162
Performs ``os.closerange(fd, INF)``.
51635163

5164+
.. data:: POSIX_SPAWN_CHDIR
5165+
5166+
(``os.POSIX_SPAWN_CHDIR``, *path*)
5167+
5168+
Performs ``os.chdir(path)``.
5169+
51645170
These tuples correspond to the C library
51655171
:c:func:`!posix_spawn_file_actions_addopen`,
51665172
:c:func:`!posix_spawn_file_actions_addclose`,
5167-
:c:func:`!posix_spawn_file_actions_adddup2`, and
5168-
:c:func:`!posix_spawn_file_actions_addclosefrom_np` API calls used to prepare
5173+
:c:func:`!posix_spawn_file_actions_adddup2`,
5174+
:c:func:`!posix_spawn_file_actions_addclosefrom_np`, and
5175+
:c:func:`!posix_spawn_file_actions_addchdir_np` API calls used to prepare
51695176
for the :c:func:`!posix_spawn` call itself.
51705177

51715178
The *setpgroup* argument will set the process group of the child to the value
@@ -5209,8 +5216,11 @@ written in Python, such as a mail server's external command delivery program.
52095216

52105217
.. versionchanged:: 3.13
52115218
*env* parameter accepts ``None``.
5212-
``os.POSIX_SPAWN_CLOSEFROM`` is available on platforms where
5213-
:c:func:`!posix_spawn_file_actions_addclosefrom_np` exists.
5219+
5220+
.. versionchanged:: 3.14
5221+
``os.POSIX_SPAWN_CLOSEFROM`` and ``os.POSIX_SPAWN_CHDIR`` are available
5222+
on platforms where :c:func:`!posix_spawn_file_actions_addclosefrom_np`
5223+
and :c:func:`!posix_spawn_file_actions_addchdir_np` exist.
52145224

52155225
.. availability:: Unix, not WASI, not Android, not iOS.
52165226

0 commit comments

Comments
 (0)