delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/24/18:36:42

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20011024183005.023d2800@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Wed, 24 Oct 2001 18:34:45 -0400
To: "Miguelanxo Otero" <miguelanxotero AT hotmail DOT com>
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: write() on closed socket crashes program instead of
reporting error
Cc: cygwin AT cygwin DOT com
In-Reply-To: <F124gVvpQN1RmpS31bT0001b866@hotmail.com>
Mime-Version: 1.0

Email from Stipe Tolj to this list today may be the tie-in you're looking
for.  You should check it out and perhaps converse with him about it.  It
sounds like he doesn't have time to track the problem he's seeing with 
Apache but if it is the same as yours, you may be better equipped or at 
least be able to provide a smaller test case (than Apache that is) which 
shows the problem.  Again, I'm not sure that your issue and Stipe's 
Apache problem are related but since you mentioned it as a possibility,
I'm just pointing you to some further info...

Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



At 06:06 PM 10/24/2001, Miguelanxo Otero wrote:
>No, I only test it under 1.3.2 but I think that, as my program follows the classic way of I/O code, there must be a bug, and I wonder how it could pass without notice. Or maybe I have done something wrong...
>
>But, hey! how can you asure a socket will be open when you start write()'ing to it?
>
>Or, what about apache? is this bug showing there?
>
>
>>From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
>>To: "Miguelanxo Otero" <miguelanxotero AT hotmail DOT com>, cygwin AT cygwin DOT com
>>Subject: Re: write() on closed socket crashes program instead of  reporting error
>>Date: Wed, 24 Oct 2001 10:25:50 -0400
>>
>>At 09:44 AM 10/24/2001, Miguelanxo Otero wrote:
>> >Ok, this time i'll try to be very concise.
>> >
>> >Im porting a linux application (a web server). The web server is able to manage different connections at a time (max 10 connections).
>> >
>> >The problem is this... Imagine tou are downloading a page & in the middle of the download you kill (or press the stop button in) the web browser (client application). Then, if my web server tries to write() in the (closed | killed) socket, instead of reporting an error, the program crashes.
>> >
>> >If i run my web server in the bash console of cygwin, it reports an "broken pipe" error after crashing.
>> >
>> >If I run the web server in a ms-dos console, it dies silently.
>> >
>> >the code is like this:
>> >
>> >if ((count=write(client_socket,requested_web_page_buffer,length))==-1) {
>> >perror("write");
>> >free_stuff_of_this_connection();
>> >}
>> >
>> >In linux, if write fails, perror reports the error and the program frees connection & keeps running ok.
>> >
>> >In windows (cygwin) if write fails, perror doesn't report anything & program crashes.
>> >
>> >Im using cygwin1.dll version 1.3.2.
>>
>>
>>Have you tried 1.3.3 or a snapshot?  It would be quite helpful to know
>>if you have.  Sorry if I missed part of some previous thread here which
>>indicates that you have done this already.
>>
>>
>>
>>Larry Hall                              lhall AT rfk DOT com
>>RFK Partners, Inc.                      http://www.rfk.com
>>118 Washington Street                   (508) 893-9779 - RFK Office
>>Holliston, MA 01746                     (508) 893-9889 - FAX
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019