nebraska: Make runtime files creation atomic

Users of nebraska look for the existence of the port and pid files and
then read their content. If they read the content after the file(s) are
created but before they are written into, then problems can occur. In
this CL we first create partial files and then move them into their
final locations atomically.

TEST=./ --runtime-root /tmp --log-file stdout

Change-Id: I6bf5307b68017657451e912b5517e36988d33c8a
Tested-by: Amin Hassani <>
Reviewed-by: Jae Hoon Kim <>
Commit-Queue: Amin Hassani <>
1 file changed