Message266501
| Author |
evan.jones@bluecore.com |
| Recipients |
evan.jones@bluecore.com, ned.deily, ronaldoussoren |
| Date |
2016年05月27日.15:55:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1464364528.91.0.161402037246.issue27126@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I have a crazy idea, but I'm not 100% sure how to implement it: If Python was able to detect and report this error in a friendly way, it would allow people to easily understand what is happening and to work around it. How can we do it?
First idea: In the implementation of os.fork(), detect if libdispatch has been used. If it has, throw an exception. I think this is probably possible using the libdispatch public APIs, but I'll need to figure out the details. In general, this could apply on Linux as well: throw an exception if the process has more than one thread running?
Second idea: On Mac OS X only, libdispatch is intentionally crashing the process. We could install a signal handler that attempts to detect *this specific crash* in order to throw a friendlier exception, or at worst crash with a useful message.
Third idea: Add documentation to the multiprocessing module and os.fork that they are very unsafe on Mac OS X?
Maybe there is a better way of making this crash "friendlier"? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年05月27日 15:55:28 | evan.jones@bluecore.com | set | recipients:
+ evan.jones@bluecore.com, ronaldoussoren, ned.deily |
| 2016年05月27日 15:55:28 | evan.jones@bluecore.com | set | messageid: <1464364528.91.0.161402037246.issue27126@psf.upfronthosting.co.za> |
| 2016年05月27日 15:55:28 | evan.jones@bluecore.com | link | issue27126 messages |
| 2016年05月27日 15:55:28 | evan.jones@bluecore.com | create |
|