571 |
571 |
572 if(handler->result == REQ_ABORTED && handler->process.pid != 0) { |
572 if(handler->result == REQ_ABORTED && handler->process.pid != 0) { |
573 log_ereport(LOG_FAILURE, "cgi-send: kill script: %s pid: %d", handler->path, (int)handler->process.pid); |
573 log_ereport(LOG_FAILURE, "cgi-send: kill script: %s pid: %d", handler->path, (int)handler->process.pid); |
574 if(killpg(handler->process.pid, SIGKILL)) { |
574 if(killpg(handler->process.pid, SIGKILL)) { |
575 log_ereport(LOG_FAILURE, "cgi-send: pid: %d kill failed: %s", (int)handler->process.pid, strerror(errno)); |
575 log_ereport(LOG_FAILURE, "cgi-send: pid: %d kill failed: %s", (int)handler->process.pid, strerror(errno)); |
|
576 // test: does kill work? |
|
577 if(kill(handler->process.pid, SIGKILL)) { |
|
578 log_ereport(LOG_FAILURE, "cgi-send: pid %d kill2 failed: %s", (int)handler->process.pid, strerror(errno)); |
|
579 } else { |
|
580 log_ereport(LOG_DEBUG, "cgi-send: kill(%d, SIGKILL): success", (int)handler->process.pid); |
|
581 } |
576 } |
582 } |
577 } |
583 } |
578 |
584 |
579 if(--handler->events > 0) { |
585 if(--handler->events > 0) { |
580 return 0; |
586 return 0; |