Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
79760ed2
Commit
79760ed2
authored
Apr 01, 2018
by
Gregory P. Smith
Committed by
GitHub
Apr 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-20104: Add os.posix_spawn documentation. (#6334)
parent
aa8e51f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
Doc/library/os.rst
Doc/library/os.rst
+25
-0
No files found.
Doc/library/os.rst
View file @
79760ed2
...
...
@@ -3353,6 +3353,31 @@ written in Python, such as a mail server's external command delivery program.
subprocesses.
.. function:: posix_spawn(path, argv, env, file_actions=None)
Wraps the posix_spawn() C library API for use from Python.
Most users should use :class:`subprocess.run` instead of posix_spawn.
The *path*, *args*, and *env* arguments are similar to :func:`execve`.
The *file_actions* argument may be a sequence of tuples describing actions
to take on specific file descriptors in the child process between the C
library implementation's fork and exec steps. The first item in each tuple
must be one of the three type indicator listed below describing the
remaining tuple elements:
(os.POSIX_SPAWN_OPEN, fd, path, open flags, mode)
(os.POSIX_SPAWN_CLOSE, fd)
(os.POSIX_SPAWN_DUP2, fd, new_fd)
These tuples correspond to the C library posix_spawn_file_actions_addopen,
posix_spawn_file_actions_addclose, and posix_spawn_file_actions_adddup2 API
calls used to prepare for the posix_spawn call itself.
.. versionadded:: 3.7
.. function:: register_at_fork(*, before=None, after_in_parent=None, \
after_in_child=None)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment