This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: multiprocessing package incompatible with PyObjC
Type: behavior Stage: resolved
Components: macOS Versions: Python 3.2, Python 3.3, Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: multiprocessing needs option to eschew fork() under Linux
View: 8713
Assigned To: ronaldoussoren Nosy List: mrmekon, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2011-12-08 20:26 by mrmekon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit mrmekon, 2011-12-08 20:26 Example of multiprocessing failing with PyObjC
Messages (3)
msg149051 - (view) Author: Trevor Bentley (mrmekon) Date: 2011-12-08 20:26
The multiprocessing package appears to spawn a new process by calling only fork().  Apple's CoreFoundation libraries (and possibly more, I do not know the full extent) *require* new processes to be spawned with the full fork()+exec*() combo.

When using PyObjC to access native Mac libraries, Python's multithreading library is not usable.  The error thrown is:

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Test code:
msg149053 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-12-08 21:06
(Reference original discussion in pyobjc-dev mailing list archived here:
msg150580 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-01-04 03:34
Issue8713 proposes adding the option of using processes for multiprocessing rather than bare forks.  Let's consolidate this issue with that one.
Date User Action Args
2022-04-11 14:57:24adminsetgithub: 57767
2012-01-04 03:34:27ned.deilysetstatus: open -> closed
resolution: duplicate
messages: + msg150580

superseder: multiprocessing needs option to eschew fork() under Linux
stage: resolved
2011-12-08 21:06:26ned.deilysetmessages: + msg149053
2011-12-08 20:43:30pitrousetnosy: + ned.deily

versions: + Python 3.2, Python 3.3
2011-12-08 20:26:13mrmekoncreate