<html><head></head><body style="font-family: "times new roman", "new york", times, serif; font-size: 12pt; width: 90%; height: 90%;"><div>Dear Development Team,<div></div><div><br></div><div>I have one question about the logging mechanism of nginx with more worker processes under Windows.</div><div><br></div><div>In ngx_log.c is the function ngx_write_console() which calls the systemcall WriteFile().</div><div><br></div><div>How is do you ensures that there is no race condition while using this function to write into the error.log file with multiple working processes?</div><div><br></div><div>From my understanding, each worker process writes into the error.log file by itself. So it could be that there are two processes (worker) trying to write at the same time?</div><div>So usually you need some locking, semaphore, mutex or something like that?</div><div><br></div><div>If you ensure that there will be no race condition, how do you guarantee it?</div><div><br></div><div>I am looking forward to your answer.</div><div><br></div><div>Kind regards,</div><div>Stefan</div><div></div></div></body></html>