Lines Matching defs:pid
145 #define GETPID_REQ 3 /* get the pid of script created for prior request */
204 * to find the script pid when it is time for that
323 kill(proc->pid, SIGHUP); /* send signal to daemon telling it to die */
730 pid_t pid;
733 pid = (pid_t)((long)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id)));
734 rv = sock_write(sd2, &pid, sizeof(pid));
738 "Error writing pid %" APR_PID_T_FMT " to handler", pid);
799 procnew->pid = 0; /* no process to clean up */
838 procnew->pid = 0; /* no process to clean up */
842 /* If the script process was created, remember the pid for
844 * out any prior pid with the same key.
864 (void *)((long)procnew->pid));
885 procnew->pid = daemon_pid;
915 procnew->pid = -1;
1028 /* Make sure the pid is appended to the sockname */
1303 static apr_status_t dead_yet(pid_t pid, apr_interval_time_t max_wait)
1311 * SIGCHLD is ignored, kill(pid,0) returns success for up to
1316 if (getpgid(pid) < 0) {
1318 if (kill(pid, 0) < 0) {
1331 static apr_status_t cleanup_nonchild_process(request_rec *r, pid_t pid)
1333 kill(pid, SIGTERM); /* in case it isn't dead yet */
1334 if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) {
1339 pid);
1340 kill(pid, SIGKILL);
1341 if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) {
1346 pid);
1347 kill(pid, SIGKILL);
1358 pid_t pid;
1377 /* wait for pid of script */
1378 stat = sock_read(sd, &pid, sizeof(pid));
1383 if (pid == 0) {
1389 return cleanup_nonchild_process(info->r, pid);