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:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=CziDatTAKOvto/yfLfah06o7ZbnmMfZAup+6pLYUEbr 3RRgKc0yPUmeAnQ2ntXhuejv4dyIEwKYp0VjBMnMpF5fd0/hE7lP54RzC9D7PEbh RdFw5WBAigboIHhY8etA5ywX3X6YhyQq+/hWtUfsb4xiSb+JxT8xNA1bRJmEamsI = 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:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=YCcPHntjsDpVid3Y3uKI+Rmauac=; b=duwDx59Ow04lpz/oZ 6x7UmxKw3sku1+FO4qZNQNVm2U81jhbQNB2iUhwG3vofwz/lrK/8Xwqb9tRFCUoY zbbO8DdWAaW8QPKaGbs5Fkfh9hmgFpFEXrMugSYZJjupKyyCdkRhh+5C2pO6GjIC j/z3jJAlvTZs211xlLK0SQlwW8= 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=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mailscanner02.zoner.fi Date: Tue, 24 Feb 2015 16:16:01 +0200 From: Lasse Collin To: cygwin AT cygwin DOT com Subject: Re: Clearing O_NONBLOCK from a pipe may lose data Message-ID: <20150224161601.68f0a08c@tukaani.org> In-Reply-To: <20150224110953.GF437@calimero.vinschen.de> References: <20150222220747 DOT 789401d2 AT tukaani DOT org> <20150223105653 DOT GG437 AT calimero DOT vinschen DOT de> <20150223122345 DOT GM437 AT calimero DOT vinschen DOT de> <54EC2566 DOT 4030703 AT towo DOT net> <20150224110953 DOT GF437 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus Received-SPF: none X-IsSubscribed: yes On 2015-02-24 Corinna Vinschen wrote: > On Feb 24 08:16, Thomas Wolff wrote: > > Am 23.02.2015 um 13:23 schrieb Corinna Vinschen: > > >On Feb 23 11:56, Corinna Vinschen wrote: > > >>On Feb 22 22:07, Lasse Collin wrote: > > >>>Alternative idea: Would there be a significant downside if Cygwin > > >>>remembered if non-blocking mode was enabled at some point and > > >>>close() would use that flag instead of the current (non)blocking > > >>>status to determine if the background thread hack should be used? > > >>No, that should be doable with very minor effort. > > >That's still an option, of course. > > I think that sounds like a solution. > > I applied a matching patch for this: > > https://cygwin.com/ml/cygwin-cvs/2015-q1/msg00079.html > > Please give it a try. I applied the patches to the snapshot 20150223 and it works now. Thank you. I'm going to release xz 5.2.1 in a day or two. Should that release have a workaround for this Cygwin bug? The workaround would avoid using O_NONBLOCK on stdout. It adds a race condition to signal handling in xz but it's usually a very minor issue (xz 5.0.x has the race and no one has complained). On the other hand, the fixes to the threading bugs are somewhat important for xz too, so maybe I should just add a note that xz 5.2.x isn't safe on Cygwin yet but will be in the (somewhat) near future? On 2015-02-23 Corinna Vinschen wrote: > The idea was always that you can run Cygwin processes without having > to install services, That's why we were always trying to implement as > much inside the restrictions of the DLL and not rely on an external > service like cygserver. The only notable exception from this rule so > far is XSI IPC, which requires cygserver to run. SOmehow it would be > nice if we could keep it that way and not go full "Windows subsytem > mode"... I agree, keeping it that way would be nice. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode -- 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