Message84750
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) |
|
Date |
User |
Action |
Args |
2009-03-31 04:13:03 | loewis | set | recipients:
+ loewis, jnoller, asvetlov |
2009-03-31 04:13:03 | loewis | set | messageid: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> |
2009-03-31 04:13:01 | loewis | link | issue5619 messages |
2009-03-31 04:13:01 | loewis | create | |
|