Lines Matching refs:pid_fd
112 static volatile int pid_fd = -2; variable
427 if (pid_fd <= -2) return; in remove_pid_file()
428 if (srv->srvconf.pid_file && 0 <= pid_fd) { in remove_pid_file()
429 if (0 != ftruncate(pid_fd, 0)) { in remove_pid_file()
434 if (0 <= pid_fd) { in remove_pid_file()
435 close(pid_fd); in remove_pid_file()
436 pid_fd = -1; in remove_pid_file()
1006 if (0 <= pid_fd) { in server_graceful_state_bg()
1007 close(pid_fd); in server_graceful_state_bg()
1008 pid_fd = -1; in server_graceful_state_bg()
1066 if (pid_fd > 0) pid_fd = -pid_fd; /*(flag to skip removing pid file)*/ in server_graceful_state()
1219 if (0 <= pid_fd) { in server_main_setup_workers()
1220 close(pid_fd); in server_main_setup_workers()
1221 pid_fd = -1; in server_main_setup_workers()
1475 if (-2 == pid_fd) pid_fd = -1; /*(initial startup state)*/ in server_main_setup()
1476 if (-1 == pid_fd && srv->srvconf.pid_file) { in server_main_setup()
1478 …if (-1 == (pid_fd = fdevent_open_cloexec(pidfile, 0, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC, S_IRUS… in server_main_setup()
1497 …if (-1 == (pid_fd = fdevent_open_cloexec(pidfile, 0, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWU… in server_main_setup()
1681 if (pid_fd > 2) { in server_main_setup()
1686 if (-1 == write_all(pid_fd, BUF_PTR_LEN(tb))) { in server_main_setup()
1688 close(pid_fd); in server_main_setup()
1689 pid_fd = -1; in server_main_setup()
1692 } else if (pid_fd < -2) { in server_main_setup()
1693 pid_fd = -pid_fd; in server_main_setup()
1874 if (pid_fd < -2) pid_fd = -pid_fd; in server_handle_sigalrm()