write_pidfile
static int write_pidfile(int, pid_t);
if (write_pidfile(pid_fd, pid) == -1) /* logs errors on failure */