Nginx NJS fs.writeFileSync is atomic writing and race condition prevention ?

HENG ourwaiting at gmail.com
Fri Oct 19 03:33:57 UTC 2018


Hello:

I am new to Nginx NJS, and I want to write a website with NJS.

I want to write a simple JSON database with NJS fs.writeFileSync ,just like
Node.js LowDB.

but I have no idea . Does NJS fs.writeFileSync is atomic writing and race
condition prevention ?

If NJS fs.writeFileSync is NOT atomic writing, it can NOT be treate as a
normal database file write.

Thank you !

-- 
--------------------------------------------------------------------
Heng
---------------------------------------------------------------------
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20181019/a5d66c00/attachment.html>


More information about the nginx-devel mailing list