mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-24 14:35:35 +02:00
Add code to stop asserts from tossing up dialogs
Assert dialogs can be a problem when running as a service. This change instructs assert info to be sent to stdout instead of a dialog.
This commit is contained in:
parent
25e52cb498
commit
39706fca9c
@ -35,7 +35,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <crtdbg.h>
|
||||
#ifndef __MINGW32__
|
||||
#include <Crtdbg.h>
|
||||
#endif
|
||||
|
||||
#include "sfds.h"
|
||||
|
||||
@ -2920,6 +2922,7 @@ void WSHELPinitialize()
|
||||
|
||||
winsock_initialized = 1;
|
||||
|
||||
#ifndef __MINGW32__
|
||||
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
|
||||
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT);
|
||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
|
||||
@ -2927,6 +2930,8 @@ void WSHELPinitialize()
|
||||
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
|
||||
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
DBG_MSG("<- WSHELPinitialize()...\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user