Commit Graph
66 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier 3a67a60098 2009-11-16 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: patch by James P. Mitchel III.
	The change corrects an instance of unsynchronized access to shared
	state and is probably the intent of the original code.


svn path=/trunk/mcs/; revision=146290
2009-11-16 21:39:30 +00:00
Marek Habersack becbc3884f 2009-09-30 Marek Habersack <[email protected]>
* InotifyWatcher.cs: optimized the Renamed event child update loop
	in the previous commit for directories in ProcessEvents.

svn path=/trunk/mcs/; revision=142984
2009-09-30 10:39:11 +00:00
Gonzalo Paniagua Javier a1cb05c2e4 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: fixes bug #322330. Patch by Alexander Kojevnikov.
	This patch fixes the issues reported by the OP and in my previous
	comment. In particular:

	Hunks 1 and 4 remove the new_name_needed flag, it's not used
	anywhere and only adds confusion.

	Hunk 2 skips DeleteSelf event for sub-directories, they receive the
	Delete event anyway.

	Hunk 3 makes sure that we use a combination of Deleted+Created
	notifications instead of a single Renamed notification, if the watched item
	has been moved from one directory to another. This is because RenamedEventArgs
	supports only one directory name: FullPath is always directory+name,
	OldFullPath is always directory+old_name.

	Hunk 5 updates relevant InotifyData instances with the new directory
	name.  Without this, notifications always use the original folder names.

	The last hunk may be a bit slow as it needs to iterate on all the
	InotifyData instances. On the other hand, we are already doing it on the
	Delete event (lines 560:568) and by default inotify allows only 8192 watches
	per user.


svn path=/trunk/mcs/; revision=142958
2009-09-30 05:26:16 +00:00
Gonzalo Paniagua Javier 6457cfba7c 2009-07-13 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: when a watched subdirectory is deleted, remove it
	from the list of children and only raise an event if it matches the
	filter.


svn path=/trunk/mcs/; revision=137829
2009-07-13 22:31:34 +00:00
Marek Habersack 90b4f380d1 2009-06-04 Marek Habersack <[email protected]>
* HttpApplicationFactory.cs: OnFileChanged ignores the directory
	part of the file triggering the event. Fixes bug #509998

2009-06-04  Marek Habersack  <[email protected]>

	* InotifyWatcher.cs: filter pattern should be matched on file name
	alone, not on the relative path of the file triggering the
	event. Fixes bug #509998

svn path=/trunk/mcs/; revision=135460
2009-06-04 17:33:52 +00:00
Gonzalo Paniagua Javier 0fff03b008 2009-03-11 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: don't send events when a directory is created
	unless it matches the pattern.  Fixes bug #484082.


svn path=/trunk/mcs/; revision=129112
2009-03-12 00:20:55 +00:00
Marek Habersack 21c73210aa 2009-01-26 Marek Habersack <[email protected]>
* SearchPattern.cs: make IsMatch work for situations when there is
	no wildcard in the pattern, but a subdirectory match is being
	tested, e.g. pattern == "file.txt" and text ==
	"subdir/file.txt". Lack of support for this has been causing
	watching for changes to ASP.NET's web.config in subdirectories to
	fail.

svn path=/trunk/mcs/; revision=124491
2009-01-26 13:26:21 +00:00
Jonathan Chambers 84ec87d71b 2008-11-06 Jonathan Chambers <[email protected]>
* MonoIO.cs : Add DuplicateHandle.

2008-11-06  Jonathan Chambers  <[email protected]>

        * Process.cs : Use DuplicateHandle when redirecting
        StdInput and StdOutput. Fixes bug #436291.



svn path=/trunk/mcs/; revision=118134
2008-11-06 18:48:08 +00:00
Gonzalo Paniagua Javier f1a6211ad2 2008-10-02 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: IN_CLOSE_WRITE is triggered when a writable file is
	closed, but that does not mean that the file was actually modified.
	Fixes bug #323188.

svn path=/trunk/mcs/; revision=114646
2008-10-02 04:09:54 +00:00
Rodrigo Kumpera d1753383d8 In .:
2008-09-08  Rodrigo Kumpera  <[email protected]>

	* InotifyWatcher.cs: Really fix #359181.


svn path=/trunk/mcs/; revision=112515
2008-09-08 16:01:21 +00:00
Dick Porter 3ea724a977 2008-09-01 Dick Porter <[email protected]>
* InotifyWatcher.cs: Revert fix for bug 322330, as it is somehow
	breaking other stuff.


svn path=/trunk/mcs/; revision=112020
2008-09-01 13:03:29 +00:00
Dick Porter 5b576bcc65 2008-06-20 Dick Porter <[email protected]>
* InotifyWatcher.cs: If a directory is renamed, make sure the old
	version is removed from the requests hash.  Fixes bug 322330.



svn path=/trunk/mcs/; revision=106302
2008-06-20 13:31:37 +00:00
Rodrigo Kumpera 1afd66ee47 2008-06-18 Rodrigo Kumpera <[email protected]>
* InotifyWatcher.cs: patch from Juraj Skripsky to fix
	rename events (fixes bug #359181).



svn path=/trunk/mcs/; revision=106129
2008-06-18 17:22:55 +00:00
Marek Habersack 72103eca65 2008-04-17 Marek Habersack <[email protected]>
* FileSystemWatcher.cs: added support for NullFileWatcher. Fixes
	bug #354701

	* NullFileWatcher.cs: added an IFileWatcher implementation which
	does nothing. Selected only by setting the MONO_MANAGED_WATCHER
	environment variable to 'disabled'. Fixes bug #354701

svn path=/trunk/mcs/; revision=100953
2008-04-16 22:31:33 +00:00
Paolo Molaro 1f89e1d097 Tue Mar 11 14:29:22 CET 2008 Paolo Molaro <[email protected]>
* InotifyWatcher.cs: patch from Anders Rune Jensen ([email protected])
	to reduce memory usage (fixes bug #362147).


svn path=/trunk/mcs/; revision=97948
2008-03-11 12:47:12 +00:00
Sebastien Pouliot 9ca8585525 2007-11-06 Sebastien Pouliot <[email protected]>
* InvalidDataException.cs: Added private ctor for serialization. Fix 
	bug #324569.


svn path=/trunk/mcs/; revision=89018
2007-11-06 18:44:06 +00:00
Robert Jordan 535abaefa2 In Test/System.Diagnostics:
2007-10-30  Robert Jordan  <[email protected]>

	* ProcessTest.cs: Add tests for bug #319829.

In System.Diagnostics:
2007-10-30  Robert Jordan  <[email protected]>

	* Process.cs: Wrap the redirected streams with a stream
	that provides real async Begin/Read|Write operations.
	Fixes bug #319829.

In System.IO:
2007-10-30  Robert Jordan  <[email protected]>

	* MonoSyncFileStream.cs: Add.


svn path=/trunk/mcs/; revision=88491
2007-10-30 18:35:42 +00:00
Juraj Skripsky c616e7e11b 2007-07-19 Juraj Skripsky <[email protected]>
* FileSystemWatcher.ch (RaiseEvent): Invoke delegate directly, we don't
	need the extra control provided by using GetInvocationList().



svn path=/trunk/mcs/; revision=82295
2007-07-19 15:56:49 +00:00
Sebastien Pouliot 71e6b1a839 2006-11-01 Sebastien Pouliot <[email protected]>
* ErrorEventHandler.cs: Remove [Serializable] in NET_2_0.
	* FileSystemEventHandler.cs: Remove [Serializable] in NET_2_0.
	* FileSystemWatcher.cs: Add missing attributes for NET_2_0.
	* InvalidDataException.cs: Seal class and remove serialization ctor.
	* NotifyFilters.cs: Remove [Serializable] in NET_2_0.
	* RenamedEventHandler.cs: Remove [Serializable] in NET_2_0.
	* WatcherChangeTypes.cs: Remove [Serializable] in NET_2_0.


svn path=/trunk/mcs/; revision=67219
2006-11-01 14:20:11 +00:00
Gonzalo Paniagua Javier 2334eaa559 2006-10-04 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: workaround for a weird case. Someone is watching
	/dev with recursion enabled and the inotify file descriptor shows up
	as a directory that fails to open. Already reported to Robert Love.


svn path=/trunk/mcs/; revision=66273
2006-10-04 22:02:15 +00:00
Gonzalo Paniagua Javier be40c48e05 2006-09-05 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: fix file names for the rename event.
	* FileSystemWatcher.cs: ignore exceptions that happen when invoking
	event handlers.


svn path=/trunk/mcs/; revision=64950
2006-09-05 15:38:06 +00:00
Gonzalo Paniagua Javier 249c9d5bcb 2006-08-21 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: handle CloseWrite, as it might happen without other
	modify events.


svn path=/trunk/mcs/; revision=64170
2006-08-21 23:32:38 +00:00
Gonzalo Paniagua Javier a25ada1d51 2006-08-16 Gonzalo Paniagua Javier <[email protected]>
* FileSystemWatcher.cs: avoid argument null when we don't know yet the
	target of a rename.


svn path=/trunk/mcs/; revision=63858
2006-08-16 23:02:44 +00:00
Gonzalo Paniagua Javier 532325d1c2 2006-08-03 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: warn about inotify user watches limit.


svn path=/trunk/mcs/; revision=63309
2006-08-03 16:51:11 +00:00
Sebastien Pouliot f89c00adf4 2005-07-31 Sebastien Pouliot <[email protected]>
* FileSystemWatcher.cs: Add an EnvironmentPermission assert to read
	environment variable MONO_MANAGED_WATCHER.


svn path=/trunk/mcs/; revision=63177
2006-07-31 13:15:09 +00:00
Gonzalo Paniagua Javier 631ced8da2 2006-07-25 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: remove unused method.
	* InotifyWatcher.cs: new watcher supporting inotify directly, as there
	are some distros that do not install 'gamin' anymore. This new watcher
	takes priority over gamin, fam and default.
	* FileSystemWatcher.cs: support for the new watcher.


svn path=/trunk/mcs/; revision=62972
2006-07-25 21:21:33 +00:00
Gonzalo Paniagua Javier 3790aca1cf 2006-04-10 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: fix race condition when a directory is created and
	populated before we start monitoring it. Patch by Thong Nguyen.


svn path=/trunk/mcs/; revision=59322
2006-04-10 21:21:22 +00:00
Gonzalo Paniagua Javier f6c687f907 bug #
svn path=/trunk/mcs/; revision=59149
2006-04-06 22:19:11 +00:00
Gonzalo Paniagua Javier 4b940b084f 2006-04-06 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: add new directories to the hashtable after start
	monitoring them, otherwise the ReqNum is not set. Fixes bug #78029.


svn path=/trunk/mcs/; revision=59147
2006-04-06 22:16:48 +00:00
Gonzalo Paniagua Javier c85a3c816a 2006-01-05 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: fix arraylist access when a new directory is added and
	the new directory is watched too. Closes bug #77068.


svn path=/trunk/mcs/; revision=55093
2006-01-05 10:24:55 +00:00
Gonzalo Paniagua Javier 849c9d5112 2005-12-01 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: 
	* FileSystemWatcher.cs: use libgamin-1.so.0 instead of libfam.so.0 when
	the runtime finds libgamin. On SUSE libgamin and libfam are not the same
	libraries (on debian, they are just the same and there's no fam-server).


svn path=/trunk/mcs/; revision=53782
2005-12-01 18:50:22 +00:00
Ben Maurer 41aca6c276 Gonzalito from Ben's computer
svn path=/trunk/mcs/; revision=47130
2005-07-09 00:52:25 +00:00
Ben Maurer a68aa2eda4 remove executable bit from changelogs
svn path=/trunk/mcs/; revision=46563
2005-06-27 15:53:16 +00:00
Gonzalo Paniagua Javier 157df963d5 2005-06-25 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: make this really inactive when there are no events to
	process.


svn path=/trunk/mcs/; revision=46505
2005-06-25 19:57:39 +00:00
Gonzalo Paniagua Javier bea2c4b94f 2005-05-28 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: move the call to StartMonitoringDirectory out of any
	locks. Before, for a high amount of subdirectories (~500) it hanged
	after filling the write buffer of FAM socket. Fixes bug #74398.


svn path=/trunk/mcs/; revision=45131
2005-05-28 07:39:26 +00:00
Lluis Sanchez 1f2fd5ea5e 2005-04-05 Lluis Sanchez Gual <[email protected]>
* FAMWatcher.cs: Fix cast exception when disposing watchers.


svn path=/trunk/mcs/; revision=42568
2005-04-05 14:12:22 +00:00
Geoff Norton 4013a9bd29 2005-03-30 Geoff Norton <[email protected]>
* KeventWatcher.cs: Fix a file handle leak on raised events.



svn path=/trunk/mcs/; revision=42379
2005-03-30 18:11:49 +00:00
Lluis Sanchez 1f9b754376 2005-02-10 Lluis Sanchez Gual <[email protected]>
* DefaultWatcher.cs: Fix nullref exception when the object is disposed
	without any watcher.


svn path=/trunk/mcs/; revision=40383
2005-02-10 09:51:52 +00:00
Geoff Norton d34ac1e265 Move these changelog entries where they belong
svn path=/trunk/mcs/; revision=37634
2004-12-11 08:05:13 +00:00
Gonzalo Paniagua Javier fa2c6eb43c 2004-11-29 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: make it work when the FileMask does not have
	wildcards and we're watching a directory.


svn path=/trunk/mcs/; revision=36786
2004-11-29 19:03:29 +00:00
Ben Maurer e12984f828 2004-11-22 Ben Maurer <[email protected]>
* DefaultWatcher.cs: Copy the hashtable when we scan for changes
	so that you can make modifications in a handler. Fixes 65966.


svn path=/trunk/mcs/; revision=36403
2004-11-22 22:21:00 +00:00
Gonzalo Paniagua Javier c995669093 2004-10-07 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: if the file is removed between reading the
	directory and filling the file info, catch the exception and ignore the
	file. Fixes bug #59482.

svn path=/trunk/mcs/; revision=34767
2004-10-07 00:44:12 +00:00
Gonzalo Paniagua Javier 0556ad0e07 2004-10-07 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: don't use Directory.GetFileSystemEntries when the
	pattern has no wildcards. Fixes bug #67447.

svn path=/trunk/mcs/; revision=34765
2004-10-07 00:29:30 +00:00
Gonzalo Paniagua Javier 59fcd53a48 2004-09-04 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: s/fam/libfam.so.0/ so that g_module finds it even
	when the development package is not installed.

svn path=/trunk/mcs/; revision=33329
2004-09-04 05:58:45 +00:00
Geoff Norton 2ede344b8f Patch for bug #62532 implemention of a kqueue/kevent based FileSystemWatcher.
svn path=/trunk/mcs/; revision=32002
2004-08-06 21:42:00 +00:00
Gonzalo Paniagua Javier f04f14f3a7 2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: fixed subdirectories notifications and don't
	fail when any directory is removed. Closes bug #59840.

svn path=/trunk/mcs/; revision=30313
2004-06-24 14:22:29 +00:00
Atsushi Eno 1b9cbdb49e 2004-05-09 Atsushi Enomoto <[email protected]>
* FileSystemWatcher.cs : csc build fix. Duplicate name between class
	  field and local variable. (already filed in bugzilla #47991).

svn path=/trunk/mcs/; revision=26997
2004-05-09 17:10:32 +00:00
Gonzalo Paniagua Javier fec76c733b 2004-05-09 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs:
	* FAMWatcher.cs: use MangledFilter instead of Filter.

	* FileSystemWatcher.cs: added MangledFilter and finalizer.

	* SearchPattern.cs: fixed the case when the pattern is "*".

svn path=/trunk/mcs/; revision=26978
2004-05-09 03:31:54 +00:00
Gonzalo Paniagua Javier 43bfd6c50f 2004-03-30 Gonzalo Paniagua Javier <[email protected]>
* FAMWatcher.cs: support monitoring subdirectories. FAM doesn't do that,
	so we have to register the existing directories and add the new ones
	that might be created.

	* SearchPattern.cs: provide the pattern when it's wrong.

svn path=/trunk/mcs/; revision=24781
2004-03-30 12:26:18 +00:00
Gonzalo Paniagua Javier f5a5e15e0e 2004-03-25 Gonzalo Paniagua Javier <[email protected]>
* SearchPattern.cs: small improvement for files with no wildcard.

svn path=/trunk/mcs/; revision=24623
2004-03-25 23:52:50 +00:00