[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bugs #9667] [MinGW] GSFileHandle does not descriptor associated to sock
From: |
Willem Rein Oudshoorn |
Subject: |
[bugs #9667] [MinGW] GSFileHandle does not descriptor associated to socket |
Date: |
Fri, 16 Jul 2004 10:06:35 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030718 |
This mail is an automated notification from the bugs tracker
of the project: GNUstep.
/**************************************************************************/
[bugs #9667] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9667>
Project: GNUstep
Submitted by: Willem Rein Oudshoorn
On: Fri 07/16/2004 at 14:03
Category: Base/Foundation
Severity: 3 - Ordinary
Item Group: Bug
Resolution: None
Assigned to: None
Status: Open
Summary: [MinGW] GSFileHandle does not descriptor associated to socket
Original Submission: If GSFileHandle is actually a socket the MinGW specific
code for closing the socket is, as far as I can see, not correct.
It does close the socket, but not the C-Runtime file descriptor
created with _open_osfhandle ( )
The fact that this behaviour is wrong can be deomonstrated
with the attached program. This program will repeatedly
create and destroy a GSFileHandle object and after about
2045 iterations it will fail.
I will commit the attached patch if nobody objects.
The patch does the following:
in -[GSFileHandle gcFinalize] and in -[GSFileHandle closeFile]
it will, after calling closesocket also call close on
the filedescriptionr.
Also, in closeFile I changed the check on
"isStandardFile" to using "isSocket", because
it used to decide if we should close a socket.
However I am not sure if this is right, so if there
is a reason that "isStandardFile" is used, please say so.
Wim Oudshoorn
File Attachments
-------------------
-------------------------------------------------------
Date: Fri 07/16/2004 at 14:03 Name: GSFileHandleTest.tar Size: 10KB By: wim
Program which demonstrates the problem
http://savannah.gnu.org/bugs/download.php?item_id=9667&item_file_id=1498
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9667>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bugs #9667] [MinGW] GSFileHandle does not descriptor associated to socket,
Willem Rein Oudshoorn <=