About a year ago Ed Ravin wrote:
> I notice that syslogs from Courier programs at my shop do not include
> the PID of the process doing the logging.  Is there any way to fix this?

and Sam Varshavchik replied:
> What would you do with the pid anyway?

That seemed to be that.  I'd like to offer an answer, and pose a different
question in reply:  The PIDs let you tie a sequence of messages to
particular instance of a server.  What is gained by suppressing them? :-)

Anyway, I find it useful to have PIDs included, so I made the appropriate
changes and I enclose herewith a patch for others who might also like it.

Regards all,

David

diff -u -r courier-0.45.2/courier/libs/comstatfs.c 
courier-0.45.2.rebel/courier/libs/comstatfs.c
--- courier-0.45.2/courier/libs/comstatfs.c     Tue Dec 16 11:51:45 2003
+++ courier-0.45.2.rebel/courier/libs/comstatfs.c       Mon Mar 29 02:12:18 2004
@@ -46,6 +46,7 @@

 #ifdef DOIT

+#include <sys/vfs.h>
 int freespace(const char *ptr,
        unsigned long *tblocks, unsigned long *nblocks,
        unsigned long *tinodes, unsigned long *ninodes,
diff -u -r courier-0.45.2/tcpd/logger.c courier-0.45.2.rebel/tcpd/logger.c
--- courier-0.45.2/tcpd/logger.c        Sun Aug 19 07:50:53 2001
+++ courier-0.45.2.rebel/tcpd/logger.c  Mon Mar 29 17:29:13 2004
@@ -30,7 +30,7 @@
 #if    TESTMODE

 #else
-       openlog(argv[1], 0
+       openlog(argv[1], LOG_PID

 #ifdef LOG_NDELAY
                        | LOG_NDELAY
diff -u -r courier-0.45.2/courier/libs/lcclog.c 
courier-0.45.2.rebel/courier/libs/lcclog.c
--- courier-0.45.2/courier/libs/lcclog.c        Tue Jan 23 09:42:18 2001
+++ courier-0.45.2.rebel/courier/libs/lcclog.c  Mon Mar 29 17:29:24 2004
@@ -43,7 +43,7 @@

        logmodule=module;
        clog_msg_send_func=clog_msg_send_syslog;
-       openlog(module, 0
+       openlog(module, LOG_PID
 #ifdef  LOG_NDELAY
                        | LOG_NDELAY
 #else


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to