fetchmail-friends
[Top] [All Lists]

[fetchmail]Zombies when using the -mda option

2002-04-03 02:36:22
I'm using the mda option to pass fetched mail to another executable.
If the executable aborts, however, my process table fills up with
zombies.  One zombie was created each time Fetchmail woke up from
daemon mode and invoked the problematic executable.

I figured out how to get rid of the zombies: have Fetchmail call
wait() when it gets hit by the SIGPIPE.  The patch is at the end
of this message.

Can someone who is more familiar with the code tell me if this is
a good idea?  All I can say is that without this patch I get zombies
100% of the time on both Linux and FreeBSD and Fetchmail versions
5.9.11 and 5.4.1.  With the patch, it appears totally fixed.

    - Scott




--- fetchmail-5.9.11/driver.c   Sun Mar 31 23:46:58 2002
+++ fetchmail-5.9.11.new/driver.c       Wed Apr  3 01:23:03 2002
@@ -5,6 +5,7 @@
  * For license terms, see the file COPYING in this directory.
  */
 
+#include <sys/wait.h>
 #include  "config.h"
 #include  <stdio.h>
 #include  <setjmp.h>
@@ -753,6 +754,7 @@
            signal(SIGPIPE, SIG_IGN);
            report(stdout,
                   GT_("SIGPIPE thrown from an MDA or a stream socket
error\n"));
+           wait(0);
            err = PS_SOCKET;
            goto cleanUp;
        }




<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]Zombies when using the -mda option, Scott Bronson <=