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.

Author loewis
Recipients asvetlov, jnoller, loewis
Date 2009-03-31.04:13:00
SpamBayes Score 7.599197e-06
Marked as misclassified No
Message-id <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2009-03-31 04:13:03loewissetrecipients: + loewis, jnoller, asvetlov
2009-03-31 04:13:03loewissetmessageid: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za>
2009-03-31 04:13:01loewislinkissue5619 messages
2009-03-31 04:13:01loewiscreate