From: Tsunakawa, Takayuki [mailto:tsunakawa.ta...@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 location is a bit late: in fact, 
write_stderr() crashed when WSAStartup() failed.

Regards
Takayuki Tsunakawa

Attachment: crash_dump_before_main_v2.patch
Description: crash_dump_before_main_v2.patch

Reply via email to