Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 101)
+++ /trunk/configure.ac	(revision 102)
@@ -1851,4 +1851,8 @@
 	if test "x${withval}" != "xno"; then 
 		AC_DEFINE(SH_USE_KERN)
+
+		kernel_numeric=`uname -r | sed 's%-%.%g' | sed 's%_%.%g' | awk -F. '{ print $1*65536+$2*256+$3 }'`
+		AC_DEFINE_UNQUOTED(SH_KERNEL_NUMBER, ${kernel_numeric}, [Kernel number])
+
 		kernelversion=`uname -r`
 		AC_DEFINE_UNQUOTED(SH_KERNEL_VERSION, _("${kernelversion}"), [Define the kernel version])
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 101)
+++ /trunk/docs/Changelog	(revision 102)
@@ -1,4 +1,9 @@
 2.3.4:
-	* fixed compilation of kern_head (problem reported by S. Clormann)
+	* sh_kern.c: for 2.6.21+ don't check proc_root_lookup (not possible 
+	  anymore? proc_root_inode.lookup != proc_root_lookup)
+	* sh_extern.c: flush streams before forking (problem if [Prelink]
+	  used together with prelude logging, reported by M. deJong)
+	* fixed compilation of kern_head (regression cause by cross-compiling
+	  fix; problem reported by S. Clormann)
 	* more typos fixed (reported by John Horne)
 
Index: /trunk/include/sh_prelink.h
===================================================================
--- /trunk/include/sh_prelink.h	(revision 101)
+++ /trunk/include/sh_prelink.h	(revision 102)
@@ -10,5 +10,5 @@
 /* return S_TRUE if ELF file, S_FALSE otherwise
  */
-int sh_prelink_iself (SL_TICKET fd, off_t size, int alert_timeout);
+int sh_prelink_iself (SL_TICKET fd, off_t size, int alert_timeout, char * path);
 
 /* configuration
Index: /trunk/src/sh_entropy.c
===================================================================
--- /trunk/src/sh_entropy.c	(revision 101)
+++ /trunk/src/sh_entropy.c	(revision 102)
@@ -607,4 +607,6 @@
   }
   
+  fflush (NULL);
+
   source->pid = aud_fork(FIL__, __LINE__);
   
Index: /trunk/src/sh_extern.c
===================================================================
--- /trunk/src/sh_extern.c	(revision 101)
+++ /trunk/src/sh_extern.c	(revision 102)
@@ -126,5 +126,5 @@
   int         pfd = -1;
 #endif
-  
+
   SL_ENTER(_("sh_ext_popen"));
 
@@ -218,8 +218,10 @@
 
   PDBG(3);
-  
+
   /* 
-   * -- Fork 
+   * -- Flush streams and fork 
    */
+  fflush (NULL);
+
   task->pid = aud_fork(FIL__, __LINE__);
 
Index: /trunk/src/sh_gpg.c
===================================================================
--- /trunk/src/sh_gpg.c	(revision 101)
+++ /trunk/src/sh_gpg.c	(revision 102)
@@ -426,4 +426,6 @@
       SL_RETURN( (NULL), _("sh_gpg_popen"));
     }
+
+  fflush (NULL);
   
   source->pid = aud_fork(FIL__, __LINE__);
Index: /trunk/src/sh_kern.c
===================================================================
--- /trunk/src/sh_kern.c	(revision 101)
+++ /trunk/src/sh_kern.c	(revision 102)
@@ -987,10 +987,14 @@
 static void check_proc_root (struct sh_kernel_info * kinfo)
 {
+  struct proc_dir_entry   proc_root_dir;
+
+/* 2.6.21 (((2) << 16) + ((6) << 8) + (21)) */
+#if SH_KERNEL_NUMBER < 132629
   struct inode_operations proc_root_inode;
-  struct proc_dir_entry   proc_root_dir;
 
   memcpy (&proc_root_inode, &(kinfo->proc_root_inode), sizeof(struct inode_operations));
-  memcpy (&proc_root_dir,   &(kinfo->proc_root_dir),   sizeof(struct proc_dir_entry));
-
+
+  /* Seems that the info does not relate anymore to proc_root_lookup(?)
+   */
   if ( (unsigned int) *proc_root_inode.lookup != proc_root_lookup)
     {
@@ -998,5 +1002,8 @@
 		       _("proc_root_inode_operations.lookup != proc_root_lookup"));
     }
-  else if (    (((unsigned int) * &proc_root_dir.proc_iops) != proc_root_iops)
+#endif
+
+  memcpy (&proc_root_dir,   &(kinfo->proc_root_dir),   sizeof(struct proc_dir_entry));
+  if (    (((unsigned int) * &proc_root_dir.proc_iops) != proc_root_iops)
 	    && (proc_root_dir.size != proc_root_iops)
 	    && (((unsigned int) * &proc_root_dir.proc_fops) != proc_root_iops)
@@ -1006,4 +1013,5 @@
 		       _("proc_root.proc_iops != proc_root_inode_operations"));
     }
+
   return;
 }
Index: /trunk/src/sh_prelink.c
===================================================================
--- /trunk/src/sh_prelink.c	(revision 101)
+++ /trunk/src/sh_prelink.c	(revision 102)
@@ -71,8 +71,9 @@
 }
 
-int sh_prelink_iself (SL_TICKET fd, off_t size, int alert_timeout)
-{
-  long status;
-  char magic[4];
+int sh_prelink_iself (SL_TICKET fd, off_t size, int alert_timeout, char * path)
+{
+  long   status;
+  char   magic[4];
+  char * tmp;
 
   /* 42 bytes is about the minimum an ELF binary might have
@@ -95,4 +96,11 @@
       /*@+usedef@*/
     }
+  else
+    {
+      tmp = sh_util_safe_name (path);
+      sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, status, MSG_E_SUBGPATH, 
+		      _("Error reading file"), _("sh_prelink_iself"), tmp);
+      SH_FREE(path);
+    }
   return S_FALSE;
 }
Index: /trunk/src/sh_processcheck.c
===================================================================
--- /trunk/src/sh_processcheck.c	(revision 101)
+++ /trunk/src/sh_processcheck.c	(revision 102)
@@ -786,4 +786,6 @@
 }
 
+extern int flag_err_debug;
+
 static int sh_processes_readps (FILE * in, short * res, 
 				char * str, size_t len, 
@@ -844,4 +846,10 @@
 	    { 
 	      tstr[pos-1] = '\0';
+	      if (flag_err_debug == SL_TRUE)
+		{
+		  sh_error_handle(SH_ERR_ALL, FIL__, __LINE__, num, MSG_E_SUBGEN,
+				  tstr,
+				  _("sh_processes_readps"));
+		}
 	      /* fprintf(stderr, "<%ld> %s\n", num, tstr); */
 	      line = SKIP_WS; pos = 0;
@@ -1039,5 +1047,8 @@
       if ((res[j] & SH_PR_ANY) || (res[j] & SH_PR_PS_ANY))
 	{
+	  /* list all tests where the pid was found
+	   */
 	  sh_processes_tlist (tests, sizeof(tests), res[j]);
+
 	  /* 
 	   * case 1: in ps and found 
Index: /trunk/src/sh_tiger0.c
===================================================================
--- /trunk/src/sh_tiger0.c	(revision 101)
+++ /trunk/src/sh_tiger0.c	(revision 102)
@@ -361,5 +361,4 @@
     else
       tiger_fd = (-1);
-
 
     SL_RETURN( res, _("sh_tiger_hash_val"));
Index: /trunk/src/sh_unix.c
===================================================================
--- /trunk/src/sh_unix.c	(revision 101)
+++ /trunk/src/sh_unix.c	(revision 102)
@@ -3211,5 +3211,5 @@
 	  else if ((theFile->check_mask & MODI_PREL) != 0 && 
 		   S_TRUE == sh_prelink_iself(rval_open, fbuf.st_size, 
-					      alert_timeout))
+					      alert_timeout, theFile->fullpath))
 	    {
 	      if (0 != sh_prelink_run (theFile->fullpath, 
@@ -3251,5 +3251,5 @@
 	  else if (policy == SH_LEVEL_PRELINK &&
 		   S_TRUE == sh_prelink_iself(rval_open, fbuf.st_size, 
-					      alert_timeout))
+					      alert_timeout, theFile->fullpath))
 	    {
 	      if (0 != sh_prelink_run (theFile->fullpath, 
