Lines Matching defs:pid
70 pid_t pid;
76 AP_DECLARE(void) ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen)
81 p->pid = pid;
86 AP_DECLARE(int) ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *old_gen)
91 while (cur && cur->pid != pid) {
113 static int reclaim_one_pid(pid_t pid, action_t action)
120 /* Ensure pid sanity. */
121 if (pid < 1) {
125 proc.pid = pid;
144 pid);
145 kill(pid, SIGTERM);
154 pid);
155 kill(pid, SIGKILL);
169 pid);
233 pid_t pid = ps->pid;
235 if (pid == 0) {
239 if (reclaim_one_pid(pid, action_table[cur_action].action)) {
252 if (reclaim_one_pid(cur_extra->pid, action_table[cur_action].action)) {
253 if (ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen) == 1) {
254 mpm_callback(-1, cur_extra->pid, old_gen);
284 pid_t pid = ps->pid;
286 if (pid == 0) {
290 if (reclaim_one_pid(pid, DO_NOTHING)) {
300 if (reclaim_one_pid(cur_extra->pid, DO_NOTHING)) {
301 if (ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen) == 1) {
302 mpm_callback(-1, cur_extra->pid, old_gen);
312 /* Before sending the signal to the pid this function verifies that
313 * the pid is a member of the current process group; either using
316 AP_DECLARE(apr_status_t) ap_mpm_safe_kill(pid_t pid, int sig)
324 /* Ensure pid sanity */
325 if (pid < 1) {
329 proc.pid = pid;
338 /* The child is already dead and reaped, or was a bogus pid -
341 "cannot send signal %d to pid %ld (non-child or "
342 "already dead)", sig, (long)pid);
348 /* Ensure pid sanity. */
349 if (pid < 1) {
353 pg = getpgid(pid);
361 "refusing to send signal %d to pid %ld outside "
362 "process group", sig, (long)pid);
367 return kill(pid, sig) ? errno : APR_SUCCESS;
371 AP_DECLARE(int) ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why,
395 pid->pid);
416 "child pid %ld exit signal %s (%d), "
418 (long)pid->pid, sigdesc, signum,
424 "child pid %ld exit signal %s (%d)",
425 (long)pid->pid, sigdesc, signum);
748 ap_scoreboard_image->servers[i][0].pid == 0) {
758 static int send_signal(pid_t pid, int sig)
760 if (kill(pid, sig) < 0) {
781 "Error retrieving pid file %s", ap_pid_fname);
787 status = "httpd (no pid file) not running";
793 "httpd (pid %" APR_PID_T_FMT ") already "
798 "httpd (pid %" APR_PID_T_FMT "?) not running",
950 ei.pid = my_pid;
977 * like getting rid of the pid file. If any additional bad stuff