2009/3/25 Kristján Valur Jónsson <krist...@ccpgames.com>: > > I'm going to poke my contacts at Microsoft and ask them if there is > a way to disable popups like this for a process that runs unattended > and/or is running as a windows service.
MSVC has shipped with runtime library source since the 16-bit days, so the easier thing is just to read the source code. :) It looks like there are two possible code paths for the assertion. The first code path uses functions in dbgrpt[t].c and its behavior is controlled by CrtSetReportMode and CrtSetReportFile. The second uses functions in assert.c and its behavior is controlled by _set_error_mode. Both code paths use __crtMessageBox in crtmbox.c to actually display the message box. This function -- when running as a service -- will helpfully set MB_SERVICE_NOTIFICATION before calling the USER32 MessageBox, which ensures that you'll see exactly why your service has hung the next time you actually log in with sufficient rights. :/ The variation that goes through assert.c should write to stderr for a console-mode application, so it's reasonable to assume that we're hitting the other code path -- and that Mark's suggestion to use CrtSetReportMode would address the issue. -- Curt Hagenlocher c...@hagenlocher.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com