dedok.mad at gmail.com
Thu Mar 29 09:11:00 UTC 2018
The UNIX-like system does not guarantee atomic write to a file (i.e.
regular file). Actual, it works sometimes and for some system with tons of
limitation. I prefer to avoid this practice.
What can you do? You can lock (i.e. flock() and so on) file for writing,
It's synchronization of concurrent access.
Also, I suggest reading about fsync(), fdatasync() and kernel cache, if you
wish to avoid the power-off problem.
On 29 March 2018 at 11:51, Antonio Nappa <jeppojeps at gmail.com> wrote:
> I was wondering what happens with ngx_write_fd function and multiple
> workers, I have made some tests and it doesn't look like they are
> interfering with each other and writing in the middle of a line. However I
> am not sure, that's the reason of my question. The file was opened with the
> nginx-devel mailing list
> nginx-devel at nginx.org
*Regard,Soshnikov Vasily mailto:dedok.mad at gmail.com <dedok.mad at gmail.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx-devel