In it's simplest realization, one can implement NGINX log rotation as following:
mv access.log access.log.0 kill -USR1 `cat master.nginx.pid`
My question. Do we have a concurrency issue here? I mean, if NGINX writes a log entry between two actions (1) file was renamed and (2) it got a command to reload, could some of log entries be just lost?