Lines Matching refs:pid_file
5405 static void save_pid(const char *pid_file) { in save_pid() argument
5407 if (access(pid_file, F_OK) == 0) { in save_pid()
5408 if ((fp = fopen(pid_file, "r")) != NULL) { in save_pid()
5426 snprintf(tmp_pid_file, sizeof(tmp_pid_file), "%s.tmp", pid_file); in save_pid()
5438 if (rename(tmp_pid_file, pid_file) != 0) { in save_pid()
5440 tmp_pid_file, pid_file); in save_pid()
5444 static void remove_pidfile(const char *pid_file) { in remove_pidfile() argument
5445 if (pid_file == NULL) in remove_pidfile()
5448 if (unlink(pid_file) != 0) { in remove_pidfile()
5449 vperror("Could not remove the pid file %s", pid_file); in remove_pidfile()
5581 char *pid_file = NULL; in main() local
5788 pid_file = optarg; in main()
6349 if (pid_file != NULL) { in main()
6350 save_pid(pid_file); in main()
6365 remove_pidfile(pid_file); in main()