[Mono-bugs] [Bug 74732][Blo] Changed - Sharing/Access violation after exiting a running mono app with an open StreamWriter (SVN checkouts)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 28 Apr 2005 14:00:21 -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 flashdict@gmail.com.


--- shadow/74732	2005-04-27 17:36:37.000000000 -0400
+++ shadow/74732.tmp.304	2005-04-28 14:00:21.000000000 -0400
@@ -146,6 +146,23 @@
             command = Console.ReadLine().ToLower();
+------- Additional Comments From flashdict@gmail.com  2005-04-28 14:00 -------
+I am going to attach a patch which I have tested and passes all basic
+tests, with Unit testing is in progress and running fine.  This patch
+fixes this bug, and completely removes the dependency on procfs(5),
+and may even give us a bit of a performance enhancement.
+We  assign a new pid member to _WapiFileShare, and initialize it in
+handles.c.  If we get to _wapi_handle_check_share(), it means that the
+file was successfully opened in a  non-sharing mode in the user code,
+and therefore we simply need to check to see if the unique PID still
+exists which opened the file, using kill().
+Note, all Wapi shared directories must be removed after applying this
+patch and rebuilding, and before running mono.