Currently we are just exiting application with status code 255 on error.
Change it to _amsg_exit() which also exit application with status code 255
but it also show GUI error message or print it to console.

Use error message 10 which shows abort information on msvcrt builds.
---
 mingw-w64-crt/crt/crtexe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index 105e9c20f54b..bd069c772cc6 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -203,7 +203,7 @@ __tmainCRTStartup (void)
          _configthreadlocale (-1);
 
        if (_initterm_e (__xi_a, __xi_z) != 0)
-         return 255;
+         _amsg_exit (10); /* _RT_ABORT */
 
        startinfo.newmode = _newmode;
 #ifdef _UNICODE
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to