On Wed, Jan 21, 2004 at 06:14:39PM +0100, Stephan Sachse wrote:
> Hi,
>
> ahh thanks, but there are many changes in qmail-smtp.c. i have attached
> a diff, can you have a look of it please.
>
> in smtpcall.c is a line
>
> + int wstat;
>
> [ ... ]
>
> + wait_pid(&wstat,cc->pid); /* just kill the zombie */
>
> looks good, but some other changes and i dont no what exactly i need to
> fix the errors.
>
> can you help me to solve the zombie problem
>
Normaly the easiest approach is to download the new patch, apply the patch
to a new qmail dir and then just make (no make setup check) after that
copy the qmail-smtp executable to /var/qmail/bin.
Anyway I think this is the only needed patch to solve the zombie problem
-- acctually it works more like a stake or a crucifix :).
ATTENTION: copy paste so the tabs are gone.
Index: smtpcall.c
===================================================================
RCS file: /home/cvs-djbware/CVS/qmail-ldap/smtpcall.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- smtpcall.c 29 Oct 2003 08:22:45 -0000 1.4
+++ smtpcall.c 15 Dec 2003 13:25:19 -0000 1.5
@@ -156,6 +156,7 @@
void
call_close(struct call *cc)
{
+ int wstat;
int r;
char ch;
@@ -163,8 +164,10 @@
call_flush(cc);
close(cc->tofd);
while ((r = call_getc(cc, &ch)) == 1) ;
- if (r == -1) ; /* bad thing happend */
+ if (r == -1) ; /* bad thing happend but who cares */
close(cc->fromfd);
+
+ wait_pid(&wstat,cc->pid); /* just kill the zombie */
}
const char *
--
:wq Claudio