Lines Matching defs:pidfile
274 static long read_pid_file(const char *pidfile)
279 fd = open(pidfile, O_RDONLY);
292 static int write_pid_file(const char *pidfile)
298 fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0600);
303 unlink(pidfile);
314 int state_daemon_kill(const char *pidfile, const char *cmd)
333 pid = read_pid_file(pidfile);
342 static int check_another_instance(const char *pidfile)
346 pid = read_pid_file(pidfile);
351 pid = read_pid_file(pidfile);
360 const char *pidfile)
368 if (check_another_instance(pidfile))
376 write_pid_file(pidfile);
452 remove(pidfile);