delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <aa7d410c0807150835p529a94cflb43abb87919912@mail.gmail.com> |
Date: | Tue, 15 Jul 2008 17:35:55 +0200 |
From: | "kalle ko" <cocalle AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | write big buffer to connected socket, then close socket hangs cygwin |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
------=_Part_4439_2437905.1216136155911 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Latest updated cygwin (just updated to make sure), Windows Vista SP1. This will hang cygwin 1.5.25-cr-0x5f1: 1. Create a connected socket 2. Send a big enough buffer (> 0x4238 bytes) 3. Close the socket It will hang in the close() function. Only way is to kill it with taskmanager or close the cygwin window. Source code is attached. $ gcc bug.c -o bug && ./bug ------=_Part_4439_2437905.1216136155911 Content-Type: text/x-csrc; name=bug.c Content-Transfer-Encoding: base64 X-Attachment-Id: f_fioo57ou0 Content-Disposition: attachment; filename=bug.c I2luY2x1ZGUgPHN5cy90eXBlcy5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4u aD4NCiNpbmNsdWRlIDxzeXMvc29ja2V0Lmg+DQojaW5jbHVkZSA8ZmNudGwu aD4NCiNpbmNsdWRlIDxzdGRpby5oPg0KI2luY2x1ZGUgPHN0cmluZy5oPg0K I2luY2x1ZGUgP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wg KHN0cnVjdCBzb2NrYWRkciopJnNhLCBzaXplb2Yoc2EpKSA9PSAtMSB8fA0K CQlsaXN0ZW4oc29ja2xpc3RlbiwgNSkgPT0gLTEgfHwNCgkJZ2V0c29ja25h bWUoc29ja2xpc3RlbiwgKHN0cnVjdCBzb2NrYWRkciopJnNhLCAmc2FMZW4p ID09IC0xIHx8DQoJCShzb2NrMSA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NU UkVBTSwgSVBQUk9UT19UQ1ApKSA9PSAtMSB8fA0KCQkhc2V0Tm9uQmxvY2so c29jazEpIHx8DQoJCShjb25uZWN0KHNvY2sxLCAoc3RydWN0IHNvY2thZGRy Kikmc2EsIHNpemVvZihzYSkpID09IC0xICYmIGVycm5vICE9IEVJTlBST0dS RVNTKSkNCgl7DQoJCXBlcnJvcigic29ja2V0IGluaXQiKTsNCgkJZXhpdCgx KTsNCgl9DQoNCglwcmludGYoIlRyeWluZyB0byBhY2NlcHQoKVxuIik7DQoJ d2hpbGUgKChzb2NrMiA9IGFjY2VwdChzb2NrbGlzdGVuLCAwLCAwKSkgPT0g LTEpDQoJCS8qIHdhaXQgKi87DQoNCglwcmludGYoIlNlbmRpbmdcbiIpOw0K CXdoaWxlIChzZW5kKHNvY2sxLCBidWYsIHNpemVvZihidWYpLCAwKSA9PSAt MSkNCgl7DQoJCWlmIChlcnJubyAhPSBFQUxSRUFEWSkNCgkJew0KCQkJcGVy cm9yKCJzZW5kIik7DQoJCQlleGl0KDEpOw0KCQl9DQoJfQ0KDQoJcHJpbnRm KCJDbG9zaW5nXG4iKTsNCgljbG9zZShzb2NrMSk7DQoNCglwcmludGYoIk9L XG4iKTsNCglyZXR1cm4gMDsNCn0NCg== ------=_Part_4439_2437905.1216136155911 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------=_Part_4439_2437905.1216136155911--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |