Re: Exim 0.55 fails hpux9.05

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Neal Becker
CC: exim-users
Sujet: Re: Exim 0.55 fails hpux9.05
On Wed, 7 Aug 1996, Neal Becker wrote:

> gcc -c -g -O3 -I. deliver.c
> deliver.c: In function `deliver_local':
> deliver.c:573: `RLIMIT_CORE' undeclared (first use this function)
> deliver.c:573: (Each undeclared identifier is reported only once
> deliver.c:573: for each function it appears in.)


Oops. Philip goofs again. Apologies. I spent too many years working on
an operating system that existed in only one variation (MVS); Unix
continually catches me out with its infinite variety. It appears that
HP-UX does not have the RLIMIT_CORE option for setrlimit(). I've just
tried to check on the other OS supported by Exim, and those I can see at
the moment all seem to have it. (I can't get at a Linux or a BSDI system
just at present.) The following patch just cuts out the call on systems
that don't have it, and also fixes a misunderstanding on my part about
setrlimit in general - though that won't actually matter on other OS.

[Just had a report of other problems with 0.55, so there may even be
0.56 before I go away - something I was trying to avoid...]

*** exim-0.55/src/deliver.c Wed Aug  7 14:48:41 1996
--- deliver.c    Thu Aug  8 09:46:19 1996
***************
*** 562,567 ****
--- 562,578 ----


  if ((pid = fork()) == 0)
    {
+   /* Prevent core dumps, as we don't want them in users' home directories.
+   HP-UX doesn't have RLIMIT_CORE; I don't know how to do this in that
+   system. */
+ 
+   #ifdef RLIMIT_CORE
+   struct rlimit rl;
+   rl.rlim_cur = 0;
+   rl.rlim_max = 0;
+   setrlimit(RLIMIT_CORE, &rl);
+   #endif
+ 
    /* Ignore SIGINT and SIGTERM during delivery (SIGHUP is ignored throughout
    exim, except when being a daemon). */


***************
*** 568,577 ****
    signal(SIGINT, SIG_IGN);
    signal(SIGTERM, SIG_IGN);


-   /* Prevent core dumps, as we don't want them in users' home directories. */
- 
-   setrlimit(RLIMIT_CORE, 0);
- 
    /* Close the unwanted half of the pipe, and set the required gid/uid, first
    regaining root privilege if necessary. Note that mac_sete{g,u}id expands
    to a failure on systems without the sete{g,u}id functions, but on such
--- 579,584 ----




--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714