summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/forkserver.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40094: Add os.waitstatus_to_exitcode() (GH-19201)Victor Stinner2020-04-011-8/+2
| | | | | | | | | | | | | | Add os.waitstatus_to_exitcode() function to convert a wait status to an exitcode. Suggest waitstatus_to_exitcode() usage in the documentation when appropriate. Use waitstatus_to_exitcode() in: * multiprocessing, os, subprocess and _bootsubprocess modules; * test.support.wait_process(); * setup.py: run_command(); * and many tests.
* bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)Pablo Galindo2020-03-091-2/+4
|
* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)Victor Stinner2019-07-051-0/+19
| | | | | multiprocessing tests now stop the ForkServer instance if it's running: close the "alive" file descriptor to ask the server to stop and then remove its UNIX address.
* bpo-36888: Add multiprocessing.parent_process() (GH-13247)Thomas Moreau2019-05-201-1/+2
|
* bpo-36867: Make semaphore_tracker track other system resources (GH-13222)Pierre Glaser2019-05-101-4/+4
| | | The multiprocessing.resource_tracker replaces the multiprocessing.semaphore_tracker module. Other than semaphores, resource_tracker also tracks shared_memory segments. Patch by Pierre Glaser.
* bpo-31308: If multiprocessing's forkserver dies, launch it again when ↵Antoine Pitrou2017-11-031-5/+16
| | | | | | | | | | | | | | | | | | | | | | necessary (#3246) * bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary. * Fix test on Windows * Add NEWS entry * Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker. * Fix comment * Make sure the test doesn't muck with process state * Also test previously-started processes * Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst * Avoid masking SIGTERM in forkserver. It's not necessary and causes a race condition in test_many_processes.
* bpo-5001: More-informative multiprocessing error messages (#3079)Allen W. Smith, Ph.D2017-08-291-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-26732: fix too many fds in processes started with the "forkserver" ↵Antoine Pitrou2017-07-221-1/+4
| | | | | | | | | | method (#2813) * bpo-26732: fix too many fds in processes started with the "forkserver" method A child process would inherit as many fds as the number of still-running children. * Add blurb and test comment
* Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)Antoine Pitrou2017-06-241-4/+12
| | | | | | | | | | * Fix bpo-30596: Add close() method to multiprocessing.Process * Raise ValueError if close() is called before the Process is finished running * Add docs * Add NEWS blurb
* bpo-30643: Fix race condition in signal wakeup in forkserver (followup to PR ↵Antoine Pitrou2017-06-131-4/+8
| | | | | | | | | | | | | #1989) (#2139) * Fix race condition in signal wakeup in forkserver (followup to PR #1989) There's an admittedly well-known race condition where ECHILD can arrive just before the C function epoll_wait() and the latter wouldn't therefore return EINTR. The solution is to use set_wakeup_fd(), which was designed to avoid such race conditions. * Reset wakeup fd in child
* Fix bpo-30589: improve Process.exitcode with forkserver (#1989)Antoine Pitrou2017-06-121-35/+86
| | | | | | | | * Fix bpo-30589: improve Process.exitcode with forkserver When the child is killed, Process.exitcode should return -signum, not 255. * Add Misc/NEWS
* bpo-16500: Allow registering at-fork handlers (#1715)Antoine Pitrou2017-05-271-5/+0
| | | | | | | | | | | | * bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit
* bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)Jon Dufresne2017-05-181-2/+1
| | | | | | | | * Replaced list(<generator expression>) with list comprehension * Replaced dict(<generator expression>) with dict comprehension * Replaced set(<list literal>) with set literal * Replaced builtin func(<list comprehension>) with func(<generator expression>) when supported (e.g. any(), all(), tuple(), min(), & max())
* bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (#1319)Antoine Pitrou2017-05-041-6/+14
| | | | | | * bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver * Tweak comment
* Issue #28053: Applying refactorings, docs and other cleanup to follow.Davin Potts2016-09-091-1/+1
|
* Issue #25654:Victor Stinner2016-03-251-7/+1
| | | | | | | | | * 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 #23285: PEP 475 -- Retry system calls failing with EINTR.Charles-François Natali2015-02-071-16/+2
|
* Issue #21566: Make use of socket.listen() default backlog.Charles-François Natali2014-07-231-1/+1
|
* Issue #18999: Make multiprocessing use context objects.Richard Oudkerk2013-10-161-101/+113
| | | | | This allows different parts of a program to use different methods for starting processes without interfering with each other.
* Issue #18934: multiprocessing: use selectors module.Charles-François Natali2013-09-051-4/+10
|
* Issue #18865: PEP 446 makes multiprocessing.util.pipe() unnecessary.Richard Oudkerk2013-08-281-1/+1
|
* Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-2/+2
| | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* Stop making fork server have copy of semaphore_tracker_fd.Richard Oudkerk2013-08-221-6/+7
|
* Issue #18762: Fix EBADF error when using forkserver.Richard Oudkerk2013-08-221-30/+25
|
* Issue #18762: Print debug info on failure to create new forkserver process.Richard Oudkerk2013-08-211-0/+15
| | | | Also modify test code to hopefully avoid deadlock on failure.
* Issue #8713: Support alternative start methods in multiprocessing on Unix.Richard Oudkerk2013-08-141-0/+238
See http://hg.python.org/sandbox/sbt#spawn