Lines Matching defs:pid
293 /** Read existing pid from pidfile.
294 * @param file: file name of pid file.
295 * @return: the pid from the file or -1 if none.
301 pid_t pid;
329 pid = (pid_t)strtol(pidbuf, &t, 10);
334 return pid;
337 /** write pid to file.
338 * @param pidfile: file name of pid file.
339 * @param pid: pid to write to file.
343 writepid (const char* pidfile, pid_t pid)
348 snprintf(pidbuf, sizeof(pidbuf), "%lu\n", (unsigned long)pid);
381 * check old pid file.
382 * @param pidfile: the file name of the pid file.
393 log_warn("unbound is already running as pid %u.",
510 /* check old pid file before forking */
523 /* daemonize because pid is needed by the writepid func */