| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-104537) (#104737)
Fix a race condition in the internal `multiprocessing.process` cleanup
logic that could manifest as an unintended `AttributeError` when calling
`BaseProcess.close()`.
(cherry picked from commit ef5d00a59207a63c6d5ae0d5d44054847d1bf3b5)
Co-authored-by: Luccccifer <lukezhang764@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
|
| |
(GH-30617)
Co-authored-by: XD Trol <milestonejxd@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
(cherry picked from commit 30610d28374f5a9698d456cebf3ae496ac01af51)
Co-authored-by: Leo Trol <milestone.jxd@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`.
In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own).
This change forces the Process object to update its `native_id` attribute during the bootstrap process.
cc @vstinner
https://bugs.python.org/issue38707
Automerge-Triggered-By: @pitrou
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add the pid and parent pid to multiprocessing.BaseProcess.__repr__().
* Add negative sign (ex: "-SIGTERM") to exitcode (process killed
by a signal)
* Only call _popen.poll() once.
Example:
<ForkProcess(ForkPoolWorker-1, started daemon)>
becomes:
<ForkProcess name='ForkPoolWorker-1' pid=12449 parent=12448 started daemon>
Example:
<ForkProcess(ForkPoolWorker-1, stopped[SIGTERM] daemon)>
becomes:
<ForkProcess name='ForkPoolWorker-1' pid=12960 parent=12959 stopped exitcode=-SIGTERM daemon>
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
be joined on exit (#3111)
* bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit
* Add NEWS blurb
|
|
|
|
|
|
| |
multiprocessing.Process.is_alive() now removes the process from the
_children set if the process completed.
The change prevents leaking "dangling" processes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-30794: added kill() method to multiprocessing.Process
* Added entries to documentation and NEWS
* Refactored test_terminate and test_kill
* Fix SIGTERM and SIGKILL being used on Windows for the tests
* Added "versionadded" marker to the documentation
* Fix trailing whitespace in doc
|
|
|
|
|
|
|
|
|
| |
* Clear potential ref cycle between Process and Process target
Besides Process.join() not being called, this was an indirect cause of bpo-30775.
The threading module already does this.
* Add issue reference
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
| |
This hides unwanted implementation details from tracebacks.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This allows different parts of a program to use different methods for
starting processes without interfering with each other.
|
|/
|
|
| |
See http://hg.python.org/sandbox/sbt#spawn
|
|\ |
|
| |
| |
| |
| |
| | |
Previously multiprocessing only expected int or str. It also wrongly
used an exit code of 1 when the argument was a string instead of zero.
|
| |
| |
| |
| | |
instead of BSD licence.
|
|\ \
| |/
| |
| | |
flush stderr after printing the exception traceback.
|
| |
| |
| |
| | |
flush stderr after printing the exception traceback.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.
Patch written by Charles-François Nataliv and Antoine Pitrou.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.
Patch written by Charles-François Nataliv and Antoine Pitrou.
|
| |
| |
| |
| |
| | |
:class:`multiprocessing.Process`. Also, fix Process.join() to not use
polling anymore, when given a timeout.
|
|/
|
|
|
|
| |
and multiprocessing.Process constructors in order to override the
default behaviour of inheriting the daemonic property from the current
thread/process.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73694 | jesse.noller | 2009-06-29 14:24:26 -0400 (Mon, 29 Jun 2009) | 1 line
Issue 5740: multiprocessing.connection.* authkey fixes
........
r73708 | jesse.noller | 2009-06-30 13:11:52 -0400 (Tue, 30 Jun 2009) | 1 line
Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes
........
r73738 | r.david.murray | 2009-06-30 22:49:10 -0400 (Tue, 30 Jun 2009) | 2 lines
Make punctuation prettier and break up run-on sentence.
........
|
|
|
|
|
|
|
|
| |
test_multiprocessing fail.
Since we are closing the fileno anyway, the best is to skip this part.
Now test_multiprocessing should pass on Windows.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65864 | jesse.noller | 2008-08-19 14:06:19 -0500 (Tue, 19 Aug 2008) | 2 lines
issue3352: clean up the multiprocessing API to remove many get_/set_ methods and convert them to properties. Update the docs and the examples included.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64517 | benjamin.peterson | 2008-06-24 22:09:05 -0500 (Tue, 24 Jun 2008) | 1 line
remove bytes alias in multiprocessing
........
r64519 | benjamin.peterson | 2008-06-25 07:39:05 -0500 (Wed, 25 Jun 2008) | 1 line
use byte literals in multiprocessing
........
|
|
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64104 | benjamin.peterson | 2008-06-10 21:40:25 -0500 (Tue, 10 Jun 2008) | 2 lines
add the multiprocessing package to fulfill PEP 371
........
r64117 | benjamin.peterson | 2008-06-11 07:26:31 -0500 (Wed, 11 Jun 2008) | 2 lines
fix import of multiprocessing by juggling imports
........
|