Re: [HACKERS] Unsafe threading in syslogger on Windows

2010-04-16 Thread Heikki Linnakangas
Heikki Linnakangas wrote: > Andrew Dunstan wrote: >> Heikki Linnakangas wrote: >>> I'm going to see what happens if I remove all the #ifdef WIN32 blocks in >>> syslogger, and let it use pgpipe() and select() instead of the extra >>> thread. >> Sounds reasonable. Let's see how big the changes are on

Re: [HACKERS] Unsafe threading in syslogger on Windows

2010-04-08 Thread Heikki Linnakangas
Andrew Dunstan wrote: > Heikki Linnakangas wrote: >> I'm going to see what happens if I remove all the #ifdef WIN32 blocks in >> syslogger, and let it use pgpipe() and select() instead of the extra >> thread. > > Sounds reasonable. Let's see how big the changes are on HEAD. I'm not > sure it's wort

Re: [HACKERS] Unsafe threading in syslogger on Windows

2010-04-08 Thread Andrew Dunstan
Heikki Linnakangas wrote: On Windows, syslogger uses two threads. The main thread loops and polls if any SIGHUPs have been received or if the log file needs to be rotated. Another thread, "pipe thread", does ReadFile() on the pipe that other processes send their log messages to. ReadFile() bloc

[HACKERS] Unsafe threading in syslogger on Windows

2010-04-08 Thread Heikki Linnakangas
On Windows, syslogger uses two threads. The main thread loops and polls if any SIGHUPs have been received or if the log file needs to be rotated. Another thread, "pipe thread", does ReadFile() on the pipe that other processes send their log messages to. ReadFile() blocks, and whenever new data arri