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

Submitted by:  Marcus Urban <mathpup>
Submitted on:  Mon 27 Dec 2004 04:31:00 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

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

fixed in cvs

Deryk Robosson <drobosson>
Project 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>

 

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 28 Dec 2004 03:35:30 AM UTCdrobossonStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Mon 27 Dec 2004 04:31:00 AM UTCmathpupAttached File-=>Added streamclose.cs, #1999

Back to the top


Powered by Savane 3.1-cleanup1