Skip to contentSkip to conversation

print udev pid

PATCH New Olaf Hering 1 participant 1 message Aug 19, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 print udev pid

makes debugging easier.

logging.c +7 -1
@@ -21,16 +21,22 @@
  */
 
 #include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
 #include <syslog.h>
 #include "udev.h"
 
 #ifdef DEBUG
 
 static int logging_init = 0;
+static unsigned char udev_logname[42];
 
 static void init_logging (void)
 {
-	openlog ("udev", 0, LOG_DAEMON);
+	snprintf(udev_logname,42,"udev[%d]", getpid());
+
+	openlog (udev_logname, 0, LOG_DAEMON);
 	logging_init = 1;
 }
 
Signature · 14 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel