Index: /trunk/src/sh_fInotify.c
===================================================================
--- /trunk/src/sh_fInotify.c	(revision 375)
+++ /trunk/src/sh_fInotify.c	(revision 376)
@@ -264,5 +264,7 @@
 static void sh_fInotify_set_nwatches()
 {
-  if (ShfInotifyWatches == 0)
+  static int fails = 0;
+
+  if (ShfInotifyWatches == 0 || fails == 1)
     return;
 
@@ -303,4 +305,5 @@
 		  _("sh_fInotify_set_nwatches"));
   SH_MUTEX_UNLOCK(mutex_thread_nolog);
+  fails = 1;
   return;
 }
Index: /trunk/src/sh_portcheck.c
===================================================================
--- /trunk/src/sh_portcheck.c	(revision 375)
+++ /trunk/src/sh_portcheck.c	(revision 376)
@@ -1793,4 +1793,5 @@
 {
   volatile int min_port;
+  static int noprivports = 0;
 
   SH_MUTEX_LOCK(mutex_port_check);
@@ -1808,13 +1809,17 @@
 	{
 	  min_port = 1024;
+	  if (noprivports == 0)
+	    {
 #ifdef TEST_ONLY
-	  fprintf(stderr, "** WARNING not scanning ports < 1024\n");
-#else
-	  SH_MUTEX_LOCK(mutex_thread_nolog);
-	  sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, 0, MSG_E_SUBGEN, 
-			  _("not scanning ports below 1024"), 
-			  _("sh_portchk_check"));
-	  SH_MUTEX_UNLOCK(mutex_thread_nolog);
-#endif
+	      fprintf(stderr, "** WARNING not scanning ports < 1024\n");
+#else
+	      SH_MUTEX_LOCK(mutex_thread_nolog);
+	      sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, 0, MSG_E_SUBGEN, 
+			      _("not scanning ports below 1024"), 
+			      _("sh_portchk_check"));
+	      SH_MUTEX_UNLOCK(mutex_thread_nolog);
+#endif
+	      noprivports = 1;
+	    }
 	}
 
