Allow DISPLAY/PURIFYOPTIONS through inndstart when using purify

Alex Kiernan alexk at demon.net
Mon Feb 5 17:01:22 UTC 2001



To get purify working on innd, I need this patch against inndstart -
I'm happy to be told its too contentious though!

Index: innd/inndstart.c
===================================================================
RCS file: /upstream-repositories/inn-cvs.isc.org/inn/innd/inndstart.c,v
retrieving revision 1.38
diff -u -r1.38 inndstart.c
--- innd/inndstart.c	2001/01/08 02:12:57	1.38
+++ innd/inndstart.c	2001/02/05 16:54:11
@@ -75,7 +75,11 @@
     char *p;
     char **innd_argv;
     char pflag[SMBUF];
+#ifdef PURIFY
+    char *innd_env[11];
+#else
     char *innd_env[9];
+#endif
 
     /* Set up the error handlers.  Always print to stderr, and for warnings
        also syslog with a priority of LOG_ERR.  For fatal errors, also
@@ -246,6 +250,15 @@
     p = getenv("TZ");
     if (p != NULL)
         innd_env[i++] = concat("TZ=", p, (char *) 0);
+#ifdef PURIFY
+    /* you have to compile with `purify cc -DPURIFY' to get this */
+    p = getenv("DISPLAY");
+    if (p != NULL)
+        innd_env[i++] = concat("DISPLAY=", p, (char *) 0);
+    p = getenv("PURIFYOPTIONS");
+    if (p != NULL)
+        innd_env[i++] = concat("PURIFYOPTIONS=", p, (char *) 0);
+#endif
     innd_env[i] = 0;
 
     /* Go exec innd. */


-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC


More information about the inn-patches mailing list