daemon: Avoid the link() syscall.
authorEthan Jackson <ethan@nicira.com>
Thu, 15 Nov 2012 02:34:14 +0000 (18:34 -0800)
committerEthan Jackson <ethan@nicira.com>
Mon, 19 Nov 2012 21:16:19 +0000 (13:16 -0800)
commit2388a783e25d53ae92090430260fbcfb5d7a8d47
tree15c399b010935e20057e23010bbe10775dd8903e
parent7beaa082d7f422dda337780d6dd457b9a5ffe7d5
daemon: Avoid the link() syscall.

make_pidfile() depends on the link() system call to atomically
create pidfiles when multiple daemons are started concurrently.
However, this system call isn't available on ESX so an alternative
strategy is necessary.  Fortunately, the approach this patch takes
is cleaner than the original code.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/daemon.c