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.

作者 loewis
收信人 asvetlov, jnoller, loewis
日期 2009-03-31.04:13:00
SpamBayes Score 7.599197e-06
Marked as misclassified
Message-id <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za>
In-reply-to
内容
To avoid bringing up CRT assert message dialogs, the CRT debug flags 
need to be passed into subprocesses for multiprocessing.

CRT doesn't have getters. Instead, you have to set to 0, get the current 
value, then restore it. This can be done with

modes = []
for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]:
    oldmode = msvcrt.CrtSetReportMode(m, 0)
    msvcrt.CrtSetReportMode(m, oldmode)
    modes.append((m, oldmode))

The same probably needs to be done for CrtSetReportFile, except
that msvcrt.CrtSetReportFile currently doesn't return the previous
value. (Also, it returns a HFILE - hopefully, the file handle value
will still be valid in the subprocess)
历史
日期 用户 动作 参数
2009-03-31 04:13:03loewis修改recipients: + loewis, jnoller, asvetlov
2009-03-31 04:13:03loewis修改messageid: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za>
2009-03-31 04:13:01loewis链接issue5619 messages
2009-03-31 04:13:01loewis创建