here's what I was going to put into initdb.c for signal handling -
comments welcome - as I think about it more I'm strongly leaning to the
"set a flag" solution - we'd check for the flag before outputting "ok"
in various places.
* signal handler in case we are interrupted.
* The Windows runtime docs at
* specifically forbid a number of things being done from a signal handler,
* most of which we do :-) (specifically, we do IO, mem allocation and
* calls). Also note the behaviour of Windows with SIGINT, which says this:
* Note SIGINT is not supported for any Win32 application, including
* Windows 98/Me and Windows NT/2000/XP. When a CTRL+C interrupt occurs,
* Win32 operating systems generate a new thread to specifically handle
* that interrupt. This can cause a single-thread application such as
* to become multithreaded, resulting in unexpected behavior.
* I have no idea how to handle this. (Strange they call UNIX an
* So this will need some testing on Windows.
* One alternative might be to set a flag that we periodically check for.
pgsql-hackers-win32 by date
|Next:||From: Andrew Dunstan||Date: 2003-10-06 17:35:52|
|Subject: db encoding|
|Previous:||From: Andrew Dunstan||Date: 2003-10-04 23:15:15|
|Subject: Re: [HACKERS] initdb |