Welcome! Log In Create A New Profile

Advanced

NGX error logging - Race condition possible?

Slawitscheck Stefan via nginx-devel
September 02, 2018 02:46PM
Dear Development Team,
I have one question about the logging mechanism of nginx with more worker processes under Windows.
In ngx_log.c is the function ngx_write_console() which calls the systemcall WriteFile().
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?
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?So usually you need some locking, semaphore, mutex or something like that?
If you ensure that there will be no race condition, how do you guarantee it?
I am looking forward to your answer.
Kind regards,Stefan_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

NGX error logging - Race condition possible?

Slawitscheck Stefan via nginx-devel 673 September 02, 2018 02:46PM

Re: NGX error logging - Race condition possible?

Igor Sysoev 759 September 03, 2018 02:16AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready