Re: [Exim] remote delivery process count out of step problem…

Top Pagina
Delete this message
Reply to this message
Auteur: Philip Hazel
Datum:  
Aan: Tim Sexton
CC: exim-users
Onderwerp: Re: [Exim] remote delivery process count out of step problem, AIX 5.1 Exim 4.04
On Tue, 14 May 2002, Tim Sexton wrote:

>     I have a new install of Exim 4.04 on an AIX 5.1 server, and am
> encountering the above error.  Specifically, " remote delivery process
> count got out of step."


This came up recently. It was never quite clear exactly why AIX behaves
differently in this way, but the patch below should fix it. It will be
in the next release.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



*** exim-4.04/src/exim.c    Thu Apr 18 09:08:31 2002
--- exim.c    Tue Apr 23 16:22:00 2002
***************
*** 731,739 ****
  process waits for them not to hang around, so when Exim calls wait(), nothing
  is there. The wait() code has been made robust against this, but let's ensure
  that SIGCHLD is set to SIG_DFL, because it's tidier to wait and get a process
! ending status. */


signal(SIGCHLD, SIG_DFL);

/* Save the arguments for use if we re-exec exim as a daemon after receiving
SIGHUP. */
--- 731,751 ----
process waits for them not to hang around, so when Exim calls wait(), nothing
is there. The wait() code has been made robust against this, but let's ensure
that SIGCHLD is set to SIG_DFL, because it's tidier to wait and get a process
! ending status. We use sigaction rather than plain signal() on those OS where
! SA_NOCLDWAIT exists, because we want to be sure it is turned off. (There was a
! problem on AIX with this.) */

+ #ifdef SA_NOCLDWAIT
+ {
+ struct sigaction act;
+ act.sa_handler = SIG_DFL;
+ sigemptyset(&(act.sa_mask));
+ act.sa_flags = 0;
+ sigaction(SIGCHLD, &act, NULL);
+ }
+ #else
signal(SIGCHLD, SIG_DFL);
+ #endif

/* Save the arguments for use if we re-exec exim as a daemon after receiving
SIGHUP. */

*** exim-4.04/src/deliver.c Thu Apr 18 09:08:30 2002
--- deliver.c    Tue Apr 23 16:20:32 2002
***************
*** 3847,3855 ****
  /* Ensure that we catch any subprocesses that are created. Although Exim
  sets SIG_DFL as its initial default, some routes through the code end up
  here with it set to SIG_IGN - cases where a non-synchronous delivery process
! has been forked, but no re-exec has been done. */


signal(SIGCHLD, SIG_DFL);

/* Make the forcing flag available for routers and transports, set up the
global message id field, and initialize the count for returned files and the
--- 3847,3867 ----
/* Ensure that we catch any subprocesses that are created. Although Exim
sets SIG_DFL as its initial default, some routes through the code end up
here with it set to SIG_IGN - cases where a non-synchronous delivery process
! has been forked, but no re-exec has been done. We use sigaction rather than
! plain signal() on those OS where SA_NOCLDWAIT exists, because we want to be
! sure it is turned off. (There was a problem on AIX with this.) */

+ #ifdef SA_NOCLDWAIT
+ {
+ struct sigaction act;
+ act.sa_handler = SIG_DFL;
+ sigemptyset(&(act.sa_mask));
+ act.sa_flags = 0;
+ sigaction(SIGCHLD, &act, NULL);
+ }
+ #else
signal(SIGCHLD, SIG_DFL);
+ #endif

/* Make the forcing flag available for routers and transports, set up the
global message id field, and initialize the count for returned files and the