writepid
if (writepid(&nsd) == -1) {
int writepid(struct nsd *nsd);
writepid(daemon->pidfile, getpid());