1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-12 02:37:31 +03:00

That's just the lovely way windows handles a "segfault". Gotta be really

interesting for MS to catch all those dumps...

Anyway. Oops. Seems I ran my regression tests with the old psql, and
just managed to update the backend, when I tested that patch. Turns out
there are codepaths where we'd access the Critical Section before it was
initialized. Attached patch breaks the initializeation off to a separate
part and adds that one to a much earlier position in the program.

Magnus Hagander
This commit is contained in:
Bruce Momjian
2004-11-01 19:21:50 +00:00
parent 9c3d654a16
commit 7fad5fff0d
3 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.93 2004/10/30 23:10:50 tgl Exp $
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.94 2004/11/01 19:21:50 momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@@ -307,9 +307,14 @@ consoleHandler(DWORD dwCtrlType)
}
void
setup_cancel_handler(void)
setup_win32_locks(void)
{
InitializeCriticalSection(&cancelConnLock);
}
void
setup_cancel_handler(void)
{
SetConsoleCtrlHandler(consoleHandler, TRUE);
}