Re: [Pyobjc-dev] PyObjC and multiprocessing module
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2011-12-08 15:07:25
|
On 7 Dec, 2011, at 23:54, Trevor Bentley wrote: > I found a bunch of hits for this on Google, but no answers: > > I am working on a Python application that uses the multiprocessing library. I am trying to spawn a process and perform text-to-speech with pyttsx, but I get the dreaded __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() error. Most of Apple's frameworks beyond the basic Unix tools require that you child proceses immediately call execv() instead of forking of a child and doing work there as multiprocessing does. > > Is there any way to get this working, short of switching back to threads? I see that the 'correct' way is to fork() and exec(), but I don't see any way to make that compatible with the multiprocessing module's API. Multiprocessing uses fork+exec on windows, because those aren't separate system calls there but AFAIK you cannot force the multiprocessing library to do the same on Unix platforms. Could you file a bug on python's tracker about the problem you ran into? A demo program that only uses the stdlib would be great (possibly something using Tkinter), but isn't required. Ronald > > Thanks, > > -Trevor > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |