diff options
| author | Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> | 2019-02-01 13:05:22 +0300 |
|---|---|---|
| committer | Victor Stinner <vstinner@redhat.com> | 2019-02-01 11:05:22 +0100 |
| commit | 80c5dfe74b4402d0a220c9227f262ec6fde1d7fc (patch) | |
| tree | 60a2c1af7b30b9b36b4e7a20f7ffe644c6d9a7fb /Doc/library | |
| parent | 05f1b93f5876ac970485ae008dd9ab3e8404f934 (diff) | |
| download | cpython-git-80c5dfe74b4402d0a220c9227f262ec6fde1d7fc.tar.gz | |
bpo-35537: Add setsid parameter to os.posix_spawn() and os.posix_spawnp() (GH-11608)
Diffstat (limited to 'Doc/library')
| -rw-r--r-- | Doc/library/os.rst | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 2aa51f875d..aa1316b1f2 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3386,7 +3386,7 @@ written in Python, such as a mail server's external command delivery program. .. function:: posix_spawn(path, argv, env, *, file_actions=None, \ - setpgroup=None, resetids=False, setsigmask=(), \ + setpgroup=None, resetids=False, setsid=False, setsigmask=(), \ setsigdef=(), scheduler=None) Wraps the :c:func:`posix_spawn` C library API for use from Python. @@ -3444,6 +3444,11 @@ written in Python, such as a mail server's external command delivery program. setting of the effective UID and GID. This argument corresponds to the C library :c:data:`POSIX_SPAWN_RESETIDS` flag. + If the *setsid* argument is ``True``, it will create a new session ID + for `posix_spawn`. *setsid* requires :c:data:`POSIX_SPAWN_SETSID` + or :c:data:`POSIX_SPAWN_SETSID_NP` flag. Otherwise, :exc:`NotImplementedError` + is raised. + The *setsigmask* argument will set the signal mask to the signal set specified. If the parameter is not used, then the child inherits the parent's signal mask. This argument corresponds to the C library @@ -3462,9 +3467,10 @@ written in Python, such as a mail server's external command delivery program. .. versionadded:: 3.7 + .. availability:: Unix. .. function:: posix_spawnp(path, argv, env, *, file_actions=None, \ - setpgroup=None, resetids=False, setsigmask=(), \ + setpgroup=None, resetids=False, setsid=False, setsigmask=(), \ setsigdef=(), scheduler=None) Wraps the :c:func:`posix_spawnp` C library API for use from Python. @@ -3475,6 +3481,8 @@ written in Python, such as a mail server's external command delivery program. .. versionadded:: 3.8 + .. availability:: See :func:`posix_spawn` documentation. + .. function:: register_at_fork(*, before=None, after_in_parent=None, \ after_in_child=None) |
