locks for logging on server_p.c