bugDotGNU Portable.NET - Bugs: bug #11403, Pnet does not disallowe closing...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11403: Pnet does not disallowe closing streams that are connected to the "real" console

Submitter:  Marcus Urban <mathpup>
Submitted:  Mon 27 Dec 2004 04:31:00 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 28 Dec 2004 03:35:30 AM UTC, comment #1: 

fixed in cvs

Deryk Robosson <drobosson>
Group Member
Mon 27 Dec 2004 04:31:00 AM UTC, original submission:  

On MS.NET, attempts to close the console device are ignored. By "console device," I mean output directed to a terminal. This is in contrast to the situation where standard output has been redirected to a file or pipe. To mimic MS's behavior, StreamWriters would need to check whether their streams correspond to "real" files or pipes or to a physical console.

The test case below succeeds on MS but fails under Pnet with the exception

Uncaught exception: System.ObjectDisposedException: Stream is already closed: Exception_Disposed
        at System.IO.StreamWriter.Write(String) in ./System/IO/StreamWriter.cs:239
        at System.IO.TextWriter.WriteLine(String) in ./System/IO/TextWriter.cs:288
        at System.IO.SyncTextWriter.WriteLine(String) in ./System/IO/TextWriter.cs:652
        at System.Console.WriteLine(String) in ./System/Console.cs:425
        at Testing.Main()

Marcus Urban <mathpup>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #2266:  streamclose.cs added by mathpup (142B - text/x-csharp - Test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-28 drobosson StatusNone Fixed
    Open/ClosedOpen Closed
2004-12-27 mathpup Attached File- Added streamclose.cs, #1999

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code