Skip to content

Commit 915e021

Browse files
committed
Add part of documentation
1 parent 655e555 commit 915e021

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Doc/library/os.rst

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

47584758
Performs ``os.closerange(fd, INF)``.
47594759

4760+
.. data:: POSIX_SPAWN_CHDIR
4761+
4762+
(``os.POSIX_SPAWN_CHDIR``, *path*)
4763+
4764+
Performs ``os.chdir(path)``.
4765+
47604766
These tuples correspond to the C library
47614767
:c:func:`!posix_spawn_file_actions_addopen`,
47624768
:c:func:`!posix_spawn_file_actions_addclose`,
4763-
:c:func:`!posix_spawn_file_actions_adddup2`, and
4764-
:c:func:`!posix_spawn_file_actions_addclosefrom_np` API calls used to prepare
4769+
:c:func:`!posix_spawn_file_actions_adddup2`,
4770+
:c:func:`!posix_spawn_file_actions_addclosefrom_np`, and
4771+
:c:func:`!posix_spawn_file_actions_addchdir_np` API calls used to prepare
47654772
for the :c:func:`!posix_spawn` call itself.
47664773

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

48064813
.. versionchanged:: 3.13
48074814
*env* parameter accepts ``None``.
4808-
``os.POSIX_SPAWN_CLOSEFROM`` is available on platforms where
4809-
:c:func:`!posix_spawn_file_actions_addclosefrom_np` exists.
4815+
4816+
.. versionchanged:: 3.14
4817+
``os.POSIX_SPAWN_CLOSEFROM`` and ``os.POSIX_SPAWN_CHDIR`` are available
4818+
on platforms where :c:func:`!posix_spawn_file_actions_addclosefrom_np`
4819+
and :c:func:`!posix_spawn_file_actions_addchdir_np` exist.
48104820

48114821
.. availability:: Unix, not WASI, not Android, not iOS.
48124822

0 commit comments

Comments
 (0)