• Heikki Linnakangas's avatar
    On Windows, syslogger runs in two threads. The main thread processes config · 961ad3fd
    Heikki Linnakangas authored
    reload and rotation signals, and a helper thread reads messages from the
    pipe and writes them to the log file. However, server code isn't generally
    thread-safe, so if both try to do e.g palloc()/pfree() at the same time,
    bad things will happen. To fix that, use a critical section (which is like
    a mutex) to enforce that only one the threads are active at a time.
    961ad3fd
syslogger.c 32.2 KB