X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=pxzbUdD2/Ud3uY3CdgOsuVgc78Snquwhf8C+jeVBYPY
	cK9y2fojwbhUphUxunM95KH26f6tAoUEMtPAAhj9LLe9JEc4lmLUpJO+oaJEg1nA
	9mgKJFTbgkhR+PvjY5sEkibFr5woaWeZNwOt8W5AnGENjTiC1ukOKtIpFl+/Lmco
	=
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:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-type:content-transfer-encoding;
	 s=default; bh=e/ORctbihB2zGjPGMcRRrhcCj7Y=; b=NKCJbK2puXevQ200h
	x46awnfypEysFMyJosJ81tvkGE4DYMUhm+QlBKh8d0Odj+zDECgiTIEX+dAM84LE
	6V+DdEEOAzrXqA+ImsQOxrx5c2NuE1v3Vdb2pBhZCQF4U5KMAl0paCOUvgDuATjT
	9aDpgiPYSdsLDEUgT5RcT/dIWA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:Please, Gratz, gratz, sk:stromek
X-HELO: mail-io0-f174.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:in-reply-to:references:from:date         :message-id:subject:to:content-transfer-encoding;        bh=8rmRrETgBuB44N+9jMhULueWUfZ6RcpWz2S4P3oPi1s=;        b=Nluailj2oU9F2y4NM8u5MCOeko18o0nUJVBCb6enyJw7Z2LftkQAJ2JY+IUpk489Pm         3N8Rtd0nc6kc5LlqAq/azrOJqUWkuxCUlLcLsuR2kaKivv4LX03y/i483/VnigRaPvxe         Or3/Xu1qFpi7mNhcc4vrXKfleIwzrnJiwLmJFNsLqOFxNGBBgt5CdF+AoTqJh2LiEHOy         EnCav8PQV4pBaJlIXCsjfW2dvVINH2eFyaE2TfpEJsoJumW7bnf6jDrUk0Ng9I0QbBbq         Cu1OODQPMdo6xTH+khNm3AajcnYiPGSMFTxG65uFgH+LmVh+WBP+6o31GroJgBTRzT25         tEWA==
X-Gm-Message-State: AEkoousIAKFJEB9ouU4PMmNMAa2uVxgFlw/LICHPzLHlSTTDGKj9TEGOFgHcmZOfOxVJWyN/jblIWgSyaVNKmw==
X-Received: by 10.107.28.11 with SMTP id c11mr43158002ioc.7.1471321069589; Mon, 15 Aug 2016 21:17:49 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <87ziod26wx.fsf@Rainer.invalid>
References: <CAAPqxJx+EPpzESWMOXowp3grKubWJJ7n93ftFPK1L3MKWkqrLQ@mail.gmail.com> <87ziod26wx.fsf@Rainer.invalid>
From: Pankaj Yadav <pankajdnapster@gmail.com>
Date: Tue, 16 Aug 2016 09:47:49 +0530
Message-ID: <CAAPqxJx5Tw7pMfOHSpV+O_sdKxE=got6J2QbO4rqDyc+uOdAvg@mail.gmail.com>
Subject: Re: On WIN7, write() not returning immediately even on non-blocking sockets
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u7G4IBTa013491

On Aug 16, 2016 12:31 AM, "Achim Gratz" <Stromeko@nexgo.de> wrote:
>
> 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.

I will try my best but it sounds very hard to isolate a minimal
program which will exhibit the issue.

But one thing is pretty clear, write() shouldnt block for long on a
non-blocking socket.Please tell me if there are any situation unknown
to me in which write on non-blocking socket can block and keep
countinuously calling  fhandler_socket::wait_for_events() and waiting
forever. And its happening only on win7 not any other os.

>
>
> 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
>

--
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


