1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Fix problem with zombies.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21737
This commit is contained in:
Lev A. Serebryakov 2003-10-23 12:14:17 +00:00
parent 7afdaa1a43
commit cd5cf9264b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=91953
4 changed files with 52 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= apache+mod_ssl
PORTVERSION= ${VERSION_APACHE}+${VERSION_RA}+${VERSION_MODSSL}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= russian www security
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
${MASTER_SITES_MODSSL:S/$/:modssl/} \

View File

@ -0,0 +1,25 @@
Index: src/main/alloc.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- src/main/alloc.c 20 Jun 2003 15:05:40 -0000 1.145
+++ src/main/alloc.c 2 Sep 2003 18:17:05 -0000 1.146
@@ -2859,12 +2859,10 @@
if ((p->kill_how == kill_after_timeout)
|| (p->kill_how == kill_only_once)) {
/* Subprocess may be dead already. Only need the timeout if not. */
- if (ap_os_kill(p->pid, SIGTERM) == -1) {
- p->kill_how = kill_never;
- }
- else {
- need_timeout = 1;
- }
+ if ( (ap_os_kill(p->pid, SIGTERM) == -1) && (errno == ESRCH) )
+ p->kill_how = kill_never;
+ else
+ need_timeout = 1;
}
else if (p->kill_how == kill_always) {
kill(p->pid, SIGKILL);

View File

@ -7,6 +7,7 @@
PORTNAME= apache
PORTVERSION= ${APACHE_VERSION}+${RA_VERSION}
PORTREVISION= 1
CATEGORIES= russian www
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
DISTNAME= ${PORTNAME}_${APACHE_VERSION}

View File

@ -0,0 +1,25 @@
Index: src/main/alloc.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- src/main/alloc.c 20 Jun 2003 15:05:40 -0000 1.145
+++ src/main/alloc.c 2 Sep 2003 18:17:05 -0000 1.146
@@ -2859,12 +2859,10 @@
if ((p->kill_how == kill_after_timeout)
|| (p->kill_how == kill_only_once)) {
/* Subprocess may be dead already. Only need the timeout if not. */
- if (ap_os_kill(p->pid, SIGTERM) == -1) {
- p->kill_how = kill_never;
- }
- else {
- need_timeout = 1;
- }
+ if ( (ap_os_kill(p->pid, SIGTERM) == -1) && (errno == ESRCH) )
+ p->kill_how = kill_never;
+ else
+ need_timeout = 1;
}
else if (p->kill_how == kill_always) {
kill(p->pid, SIGKILL);