diff options
author | Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> | 2019-01-16 13:29:26 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-01-16 13:29:26 (GMT) |
commit | 92b8322e7ea04b239cb1cb87b78d952f13ddfebb (patch) | |
tree | afcf4294d4949a59dc2d3383e11b5c2b91970597 /Doc/library/os.rst | |
parent | 9daecf37a571e98aaf43a387bcc9e41a7132f477 (diff) | |
download | cpython-92b8322e7ea04b239cb1cb87b78d952f13ddfebb.zip cpython-92b8322e7ea04b239cb1cb87b78d952f13ddfebb.tar.gz cpython-92b8322e7ea04b239cb1cb87b78d952f13ddfebb.tar.bz2 |
bpo-35674: Add os.posix_spawnp() (GH-11554)
Add a new os.posix_spawnp() function.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 16250e2..2aa51f8 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3396,6 +3396,10 @@ written in Python, such as a mail server's external command delivery program. The positional-only arguments *path*, *args*, and *env* are similar to :func:`execve`. + The *path* parameter is the path to the executable file.The *path* should + contain a directory.Use :func:`posix_spawnp` to pass an executable file + without directory. + 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 :c:func:`fork` and :c:func:`exec` steps. @@ -3459,6 +3463,19 @@ written in Python, such as a mail server's external command delivery program. .. versionadded:: 3.7 +.. function:: posix_spawnp(path, argv, env, *, file_actions=None, \ + setpgroup=None, resetids=False, setsigmask=(), \ + setsigdef=(), scheduler=None) + + Wraps the :c:func:`posix_spawnp` C library API for use from Python. + + Similar to :func:`posix_spawn` except that the system searches + for the *executable* file in the list of directories specified by the + :envvar:`PATH` environment variable (in the same way as for ``execvp(3)``). + + .. versionadded:: 3.8 + + .. function:: register_at_fork(*, before=None, after_in_parent=None, \ after_in_child=None) |