summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/util.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-109461: Update logging module lock to use context manager (#109462)Dale Collison2023-09-271-5/+1
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-82616: Add process_group support to subprocess.Popen (#23930)Gregory P. Smith2022-05-051-1/+1
| | | | | | | | One more thing that can help prevent people from using `preexec_fn`. Also adds conditional skips to two tests exposing ASAN flakiness on the Ubuntu 20.04 Address Sanitizer Github CI system. When that build is run on more modern systems the "problem" does not show up. It seems ASAN implementation related. Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix missing `f` prefix on f-strings (GH-91910)Alexander Shadchin2022-04-271-1/+1
|
* gh-91401: Add a failsafe way to disable vfork. (#91490)Gregory P. Smith2022-04-251-1/+3
| | | | | | | | | | | | | | Just in case there is ever an issue with _posixsubprocess's use of vfork() due to the complexity of using it properly and potential directions that Linux platforms where it defaults to on could take, this adds a failsafe so that users can disable its use entirely by setting a global flag. No known reason to disable it exists. But it'd be a shame to encounter one and not be able to use CPython without patching and rebuilding it. See the linked issue for some discussion on reasoning. Also documents the existing way to disable posix_spawn.
* bpo-46720: Add support for path-like objects to ↵Géry Ogam2022-04-221-1/+1
| | | | | multiprocessing.set_executable for Windows (GH-31279) This bring the API to be on a par with Unix-like systems.
* bpo-43651: Fix test_compileall with PEP 597 (GH-25128)Inada Naoki2021-04-021-1/+1
|
* bpo-40221: Update multiprocessing to use _at_fork_reinit (GH-19477)Dong-hee Na2020-04-141-4/+4
|
* bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)Pablo Galindo2020-03-091-0/+23
|
* bpo-38546: multiprocessing tests stop the resource tracker (GH-17641)Victor Stinner2019-12-171-0/+25
| | | | | | | | | | Multiprocessing and concurrent.futures tests now stop the resource tracker process when tests complete. Add ResourceTracker._stop() method to multiprocessing.resource_tracker. Add _cleanup_tests() helper function to multiprocessing.util: share code between multiprocessing and concurrent.futures tests.
* bpo-38417: Add umask support to subprocess (GH-16726)Gregory P. Smith2019-10-121-1/+1
| | | | On POSIX systems, allow the umask to be set in the child process before we exec.
* bpo-36046: Add user and group parameters to subprocess (GH-11950)Patrick McLean2019-09-121-1/+1
| | | | | | | | | | | | | | * subprocess: Add user, group and extra_groups paremeters to subprocess.Popen This adds a `user` parameter to the Popen constructor that will call setreuid() in the child before calling exec(). This allows processes running as root to safely drop privileges before running the subprocess without having to use a preexec_fn. This also adds a `group` parameter that will call setregid() in the child process before calling exec(). Finally an `extra_groups` parameter was added that will call setgroups() to set the supplimental groups.
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572)Victor Stinner2019-07-041-1/+13
| | | | | | Fix multiprocessing.util.get_temp_dir() finalizer: clear also the 'tempdir' configuration of the current process, so next call to get_temp_dir() will create a new temporary directory, rather than reusing the removed temporary directory.
* bpo-36888: Add multiprocessing.parent_process() (GH-13247)Thomas Moreau2019-05-201-0/+6
|
* bpo-31804: Fix multiprocessing.Process with broken standard streams (#6079)Antoine Pitrou2018-03-111-0/+14
| | | | | In some conditions the standard streams will be None or closed in the child process (for example if using "pythonw" instead of "python" on Windows). Avoid failing with a non-0 exit code in those conditions. Report and initial patch by poxthegreat.
* bpo-5001: More-informative multiprocessing error messages (#3079)Allen W. Smith, Ph.D2017-08-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make error message more informative Replace assertions in error-reporting code with more-informative version that doesn't cause confusion over where and what the error is. * Additional clarification + get travis to check * Change from SystemError to TypeError As suggested in PR comment by @pitrou, changing from SystemError; TypeError appears appropriate. * NEWS file installation; ACKS addition (will do my best to justify it by additional work) * Making current AssertionErrors in multiprocessing more informative * Blurb added re multiprocessing managers.py, queues.py cleanup * Further multiprocessing cleanup - went through pool.py * Fix two asserts in multiprocessing/util.py * Most asserts in multiprocessing more informative * Didn't save right version * Further work on multiprocessing error messages * Correct typo * Correct typo v2 * Blasted colon... serves me right for trying to work on two things at once * Simplify NEWS entry * Update 2017-08-18-17-16-38.bpo-5001.gwnthq.rst * Update 2017-08-18-17-16-38.bpo-5001.gwnthq.rst OK, never mind. * Corrected (thanks to pitrou) error messages for notify * Remove extraneous backslash in docstring.
* bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)Antoine Pitrou2017-06-131-13/+21
| | | | | | | | | | | * bpo-24484: Avoid race condition in multiprocessing cleanup The finalizer registry can be mutated while inspected by multiprocessing at process exit. * Use test.support.start_threads() * Add Misc/NEWS
* bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (#1110)Serhiy Storchaka2017-04-191-1/+1
|
* Issue #25654:Victor Stinner2016-03-251-0/+23
| | | | | | | | | * multiprocessing: open file with closefd=False to avoid ResourceWarning * _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a previous test forgot to remove TESTFN) * test_sys_exit(): remove TESTFN after each loop iteration Initial patch written by Serhiy Storchaka.
* Issue #22033: Reprs of most Python implemened classes now contain actualSerhiy Storchaka2014-07-251-3/+4
| | | | class name instead of hardcoded one.
* Issue #21565: multiprocessing: use contex-manager protocol for synchronizationCharles-François Natali2014-05-251-0/+7
| | | | primitives.
* Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-201-2/+0
|
* Issue #18865: remove unused import from multiprocessing.util.spawnv_passfds()Victor Stinner2013-08-281-1/+1
|
* Issue #18865: PEP 446 makes multiprocessing.util.pipe() unnecessary.Richard Oudkerk2013-08-281-20/+0
|
* Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-3/+5
| | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* Issue #8713: Support alternative start methods in multiprocessing on Unix.Richard Oudkerk2013-08-141-10/+60
| | | | See http://hg.python.org/sandbox/sbt#spawn
* Issue #17555: Fix ForkAwareThreadLock so that size of after forkRichard Oudkerk2013-04-171-1/+4
| | | | registry does not grow exponentially with generation of process.
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
|\ | | | | | | Patch by Serhiy Storchaka.
| * Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
| | | | | | | | Patch by Serhiy Storchaka.
| * Issue #15881: Fixed 3.2 backport.Alexander Belopolsky2012-09-091-0/+2
| |
| * Fixed whitespaceAlexander Belopolsky2012-09-091-1/+1
| |
| * Issue #15881: Fixed atexit hook in multiprocessing.Alexander Belopolsky2012-09-091-16/+38
| |
* | Issue #15881: Clarify comment in exit functionRichard Oudkerk2012-09-131-8/+11
| |
* | Fixed whitespaceAlexander Belopolsky2012-09-091-1/+1
| |
* | Issue #15881: Fixed atexit hook in multiprocessing.Alexander Belopolsky2012-09-091-9/+32
| |
* | Issue #13841: Make child processes exit using sys.exit() on WindowsRichard Oudkerk2012-06-141-12/+15
| |
* | Make Finalize reserve a reference to os.getpid in case called at shutdownRichard Oudkerk2012-06-041-2/+2
| |
* | Issue #14548: Make multiprocessing finalizers check pid before runningRichard Oudkerk2012-05-251-3/+9
| | | | | | | | This protects from possibilty of gc running just after fork.
* | Fix whitespaceAntoine Pitrou2012-05-181-1/+0
| |
* | Move private function _args_from_interpreter_flags() to subprocess.py, soAntoine Pitrou2012-05-181-29/+1
| | | | | | | | | | that it can be imported when threads are disabled. (followup to issue #12098)
* | #12098: Make multiprocessing's child processes inherit sys.flags on WindowsRichard Oudkerk2012-05-181-0/+31
| | | | | | | | Initial patch by Sergey Mezentsev.
* | Issue #14753: Make multiprocessing treat negative timeouts as it did in 3.2Richard Oudkerk2012-05-101-15/+0
| | | | | | | | | | | | | | | | In Python 3.2 and earlier, Process.join() and Connection.poll() treated negative timeouts as zero timeouts. Earlier versions from the 3.3 line of development treat them as infinite timeouts. The patch reverts to the old behaviour.
* | Mark multiprocessing files with "Licensed to PSF under a Contributor Agreement"Richard Oudkerk2012-04-301-26/+1
| | | | | | | | instead of BSD licence.
* | Remove unused or redundant imports in concurrent.futures and multiprocessing.Florent Xicluna2011-11-111-2/+1
| |
* | Use InterruptedError instead of checking for EINTRAntoine Pitrou2011-10-231-6/+3
| |
* | Rebind locally the globals which can be looked up at shutdownAntoine Pitrou2011-07-081-1/+5
| | | | | | | | (to avoid the warnings seen on a buildbot)
* | Whitespace normalizationAntoine Pitrou2011-06-061-1/+0
| |
* | Issue #12040: Expose a new attribute `sentinel` on instances ofAntoine Pitrou2011-06-061-0/+21
|/ | | | | :class:`multiprocessing.Process`. Also, fix Process.join() to not use polling anymore, when given a timeout.
* 9162: fix license in multiprocessing filesR. David Murray2010-12-141-1/+27
|
* merge r68915 to py3kJesse Noller2009-01-251-12/+24
|