From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22599 invoked by alias); 18 Oct 2003 18:24:42 -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 22585 invoked from network); 18 Oct 2003 18:24:41 -0000 Received: from unknown (HELO web14206.mail.yahoo.com) (216.136.173.70) by sources.redhat.com with SMTP; 18 Oct 2003 18:24:41 -0000 Message-ID: <20031018182440.65740.qmail@web14206.mail.yahoo.com> Received: from [208.248.82.254] by web14206.mail.yahoo.com via HTTP; Sat, 18 Oct 2003 11:24:40 PDT Date: Sat, 18 Oct 2003 18:24:00 -0000 From: Matt Jerdonek To: Discussion eCos MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [ECOS] TCP close(...) action X-SW-Source: 2003-10/txt/msg00335.txt.bz2 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? Thanks, -- Matt __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss