From: Tsunakawa, Takayuki [mailto:tsunakawa.takay@jp.fujitsu.com]
> Another idea to add to the current patch is to move the call to SetErrorMode()
> to the below function, which is called first in main(). How about this?
>
> void
> pgwin32_install_crashdump_handler(void)
> {
> SetUnhandledExceptionFilter(crashDumpHandler);
> }
I moved SetErrorMode() to the beginning of main(). It should be placed before any code which could crash. The current
locationis a bit late: in fact, write_stderr() crashed when WSAStartup() failed.
Regards
Takayuki Tsunakawa