Mailing List Archive

rmdirs... and a fix for "mbox.c" !
I was having problems with "rmdirs" going into spinloops when called
from "clamscan", so I re-coded it - attached.

I've also devised my own "quick and dirty" solution to the problem of
"clamd" crashing and leaking memory. Seeing as the problem seems to be
mainly in "mbox" i've ditched it and replaced it with "ripmime". On the
375 test messages I have been using it is also 12 seconds faster (89
secs down to 77 secs).

So, here's my new "mbox.c" :-

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#define RIPMIME "/usr/local/bin/ripmime"

int cl_mbox(const char *dir, int desc)
int ret,stat;

ret = fork();
if (ret==-1) return -1;
if (ret==0)
if (desc) dup2(desc,0);
return 0;