[pp:exec] add 'session' option (#6582)

https://github.com/mikf/gallery-dl/issues/6582#issuecomment-3067297033
This commit is contained in:
Mike Fährmann
2025-07-20 19:40:39 +02:00
parent fc06243b89
commit 9bbfb09952
3 changed files with 95 additions and 15 deletions

View File

@@ -6939,6 +6939,26 @@ Description
See `metadata.event`_ for a list of available events.
exec.session
------------
Type
``bool``
Default
``false``
Description
Start subprocesses in a new session.
On Windows, this means passing
`CREATE_NEW_PROCESS_GROUP <https://docs.python.org/3/library/subprocess.html#subprocess.CREATE_NEW_PROCESS_GROUP>`__
as a ``creationflags`` argument to
`subprocess.Popen <https://docs.python.org/3/library/subprocess.html#subprocess.Popen>`__
On POSIX systems, this means enabling the
``start_new_session`` argument of
`subprocess.Popen <https://docs.python.org/3/library/subprocess.html#subprocess.Popen>`__
to have it call ``setsid()``.
hash.chunk-size
---------------
Type