Lines Matching refs:mem_usage_check
827 static inline void kill_all_lockers(struct flock *mem_usage_check) in kill_all_lockers() argument
832 while (mem_usage_check->l_pid > 0) { in kill_all_lockers()
840 zend_accel_error(ACCEL_LOG_WARNING, "Attempting to kill locker %d", mem_usage_check->l_pid); in kill_all_lockers()
841 if (kill(mem_usage_check->l_pid, signal)) { in kill_all_lockers()
845 …zend_accel_error(ACCEL_LOG_WARNING, "Process %d died before SIGKILL was sent", mem_usage_check->l_… in kill_all_lockers()
847 …zend_accel_error(ACCEL_LOG_WARNING, "Failed to send SIGKILL to locker %d: %s", mem_usage_check->l_… in kill_all_lockers()
853 if (kill(mem_usage_check->l_pid, 0)) { in kill_all_lockers()
857 zend_accel_error(ACCEL_LOG_WARNING, "Killed locker %d", mem_usage_check->l_pid); in kill_all_lockers()
859 …zend_accel_error(ACCEL_LOG_WARNING, "Failed to check locker %d: %s", mem_usage_check->l_pid, strer… in kill_all_lockers()
871 zend_accel_error_noreturn(ACCEL_LOG_ERROR, "Cannot kill process %d!", mem_usage_check->l_pid); in kill_all_lockers()
874 mem_usage_check->l_type = F_WRLCK; in kill_all_lockers()
875 mem_usage_check->l_whence = SEEK_SET; in kill_all_lockers()
876 mem_usage_check->l_start = 1; in kill_all_lockers()
877 mem_usage_check->l_len = 1; in kill_all_lockers()
878 mem_usage_check->l_pid = -1; in kill_all_lockers()
879 if (fcntl(lock_file, F_GETLK, mem_usage_check) == -1) { in kill_all_lockers()
884 if (mem_usage_check->l_type == F_UNLCK || mem_usage_check->l_pid <= 0) { in kill_all_lockers()
905 struct flock mem_usage_check; in accel_is_inactive()
907 mem_usage_check.l_type = F_WRLCK; in accel_is_inactive()
908 mem_usage_check.l_whence = SEEK_SET; in accel_is_inactive()
909 mem_usage_check.l_start = 1; in accel_is_inactive()
910 mem_usage_check.l_len = 1; in accel_is_inactive()
911 mem_usage_check.l_pid = -1; in accel_is_inactive()
912 if (fcntl(lock_file, F_GETLK, &mem_usage_check) == -1) { in accel_is_inactive()
916 if (mem_usage_check.l_type == F_UNLCK) { in accel_is_inactive()
923 …cked by %d", (long)time(NULL), ZCG(accel_directives).force_restart_timeout, mem_usage_check.l_pid); in accel_is_inactive()
924 kill_all_lockers(&mem_usage_check); in accel_is_inactive()