X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=FFLPp aNHhVB/ABve5ztZUztnmZ5glaLdgeCZMJ+rXYI8EmHzOhghsAZfI1kWB/HrzE//Y xgvnaVEJ8Lvs6dU8N6Xs4TBgEMnlqFmsP2ndPr+nWquM4wj6Z1sNLFRGELvois3Z Iya0/zEogrvwPOgUOegXbRp4uFlv5L81ktFZT0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=rUglrWxuV8V tMqeGyhVjnHXB5kU=; b=LHiqS1yZp5HrdrgK9QD6eSL9yizCONSEHiEcXN94RSt mofByzbq8h1as6SW23vNoM1VlvlknXR6HBQf9phzdQS5Qjqj3AnkKcSrhpZKFFyR dnZeDrW9lbrJUmb5LQP2G4FHvDEfBUJDGB5EYuTQMtF9wsAKz2kbhkk1o6UQ1eH8 = Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=singles, H*f:CAAPqxJx, exhibits, H*i:sk:EPpzESW X-HELO: mail-in-06.arcor-online.net X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-09.arcor-online.net 3sClFt4ZZnz9SkB From: Achim Gratz To: cygwin AT cygwin DOT com Subject: Re: On WIN7, write() not returning immediately even on non-blocking sockets References: Date: Mon, 15 Aug 2016 21:01:18 +0200 In-Reply-To: (Pankaj Yadav's message of "Tue, 16 Aug 2016 00:04:23 +0530") Message-ID: <87ziod26wx.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Pankaj Yadav writes: > The code where it gets stuck is > > printf("Nonblocking:%d\n",(fcntl(t_qelem->respsock, F_GETFL, 0) & > O_NONBLOCK))?1:0; > i = write(t_qelem->respsock,&t_qelem->webtoresp[t_qelem->webtorespsent],t_qelem->webtoresplen-t_qelem->webtorespsent); > printf("written\n"); > > Output is : Non-blocking:1 and then it does NOT print "written" ever. You'd have better chances of getting help if you could come up with a minimal program that exhibits the error. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple