[Mono-bugs] [Bug 74398][Nor] New - FileSystemWatcher hangs when using FAM

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 5 Apr 2005 06:44:46 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lluis@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74398

--- shadow/74398	2005-04-05 06:44:46.000000000 -0400
+++ shadow/74398.tmp.21443	2005-04-05 06:44:46.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 74398
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lluis@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FileSystemWatcher hangs when using FAM
+
+The FileSystemWatcher hangs when trying to watch a big number of
+subdirectories using the FAM backend. This is the test case:
+
+using System;
+using System.IO;
+
+public class Test
+{
+	public static void Main ()
+	{
+		if (!Directory.Exists ("/tmp/testfam")) {
+			for (int n=0; n<1000;n++)
+				Directory.CreateDirectory ("/tmp/testfam/d" + n);
+		}
+			
+		FileSystemWatcher fw = new FileSystemWatcher ("/tmp/testfam");
+		fw.IncludeSubdirectories = true;
+		fw.EnableRaisingEvents = true;
+		
+		Console.WriteLine ("Ready");
+		System.Threading.Thread.Sleep (1000);
+		
+		Directory.Delete ("/tmp/testfam", true);
+    }
+}
+
+It hangs when setting fw.EnableRaisingEvents = true.