diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-08-02 13:43:04 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-08-02 13:43:04 +0000 |
commit | af46795e64ccdde2432105a8549a5da4b54546e9 (patch) | |
tree | d219b6a9fad32444a414d2ece59758b0377623fc /src | |
parent | 661d7dfa8e92db8a13f7d9c79c18e4b9f403878d (diff) |
Add missing search_tidyup() calls for the subprocess used for running
filters.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/rda.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/src/rda.c b/src/src/rda.c index 06eff227e..7819a8023 100644 --- a/src/src/rda.c +++ b/src/src/rda.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/rda.c,v 1.8 2005/06/27 14:29:43 ph10 Exp $ */ +/* $Cambridge: exim/src/src/rda.c,v 1.9 2005/08/02 13:43:04 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -607,9 +607,13 @@ if (pipe(pfd) != 0) /* Ensure that SIGCHLD is set to SIG_DFL before forking, so that the child process can be waited for. We sometimes get here with it set otherwise. Save -the old state for resetting on the wait. */ +the old state for resetting on the wait. Ensure that all cached resources are +freed so that the subprocess starts with a clean slate and doesn't interfere +with the parent process. */ oldsignal = signal(SIGCHLD, SIG_DFL); +search_tidyup(); + if ((pid = fork()) == 0) { header_line *waslast = header_last; /* Save last header */ @@ -740,9 +744,11 @@ if ((pid = fork()) == 0) rda_write_string(fd, NULL); /* Marks end of addresses */ } - /* OK, this process is now done. Must use _exit() and not exit() !! */ + /* OK, this process is now done. Free any cached resources. Must use _exit() + and not exit() !! */ (void)close(fd); + search_tidyup(); _exit(0); } |