From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27166 invoked by alias); 18 Oct 2003 18:30:52 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 27145 invoked from network); 18 Oct 2003 18:30:51 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sources.redhat.com with SMTP; 18 Oct 2003 18:30:51 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id C44D950D8DE; Sat, 18 Oct 2003 12:30:49 -0600 (MDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id C009C50D8DD; Sat, 18 Oct 2003 12:30:48 -0600 (MDT) From: Gary Thomas To: Matt Jerdonek Cc: Discussion eCos In-Reply-To: <20031018182440.65740.qmail@web14206.mail.yahoo.com> References: <20031018182440.65740.qmail@web14206.mail.yahoo.com> Content-Type: text/plain Organization: MLB Associates Message-Id: <1066501848.20516.662.camel@hermes> Mime-Version: 1.0 Date: Sat, 18 Oct 2003 18:30:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: [ECOS] TCP close(...) action X-SW-Source: 2003-10/txt/msg00336.txt.bz2 On Sat, 2003-10-18 at 12:24, Matt Jerdonek wrote: > Hi Folks, > > I have a simple program with two threads that send / > recv from a single TCP socket. One thread blocks on a > recv call while the other thread sends data on the > same socket. > > I put a close call in the send thread. The expected > behavior was for the recv thread to wake (with 0 bytes > of data) and a FIN to be sent on the ethernet. The > actual behavior was that the recv thread never woke > and the FIN was not sent. (Is this intended or a > bug?). I found the soclose function would not be > invoked because the recv was still using the file > handle. Once the recv released the file handle, the > FIN flowed on the ethernet. > > I worked around this issue by calling > cyg_thread_release from my application, which woke up > the recv thread. But I wonder if there is better > solution? Could (or should) the close call be made to > wake up blocked threads? If so, any suggestions? > How did you create this socket? How did you set up the send and receive threads? Maybe a code snippet would help us understand your problem. -- Gary Thomas MLB Associates -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss