delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/13/08:59:47

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 13 Nov 2008 15:01:47 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: closing stdout in a child python process means that process doesn't receive bytes from stdin anymore.
Message-ID: <20081113140147.GP17719@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <DB76EDB8-A3BE-4155-9FF7-EC169FF12568 AT zooko DOT com>
MIME-Version: 1.0
In-Reply-To: <DB76EDB8-A3BE-4155-9FF7-EC169FF12568@zooko.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Nov 13 06:30, zooko wrote:
> Folks:
>
> When someone runs "bin/trial --reactor=select 
> twisted.internet.test.test_process.ProcessTestsBuilder_PollReactor.test_childConnectionLost" 
> on cygwin, using the cygwin version of Python, either manually (which I've 
> done on two cygwin installations), or from the twisted buildbot -- 
> http://buildbot.twistedmatrix.com/builders/cygwin-py2.5-select -- then once 
> the child process closes its fd #2, it subsequently receives no further 
> bytes from its fd #1, even though the parent process has written some bytes 
> to that pipe.
>
> I can reproduce this by running the Twisted unit tests, like this:
>
> step 1: get twisted:
>
> svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk twisted
>
> step 2: cd into the top-level directory, and run trial:
>
> cd twisted && python ./bin/trial --reactor=select
> twisted.internet.test.test_process.ProcessTestsBuilder_PollReactor.test_
> childConnectionLost
>
> On other platforms that cygwin (see the Twisted buildbot -- 
> http://buildbot.twistedmatrix.com/supported?branch=trunk -- then this test 
> exits quickly with success. On cygwin, using cygwin python.exe, this test 
> instead enter an infinite loop as the child waits to receive further bytes 
> on its stdin, and the parent waits for the child to respond to those bytes. 
> (This doesn't happen on cygwin with the standard Win32 build of python.exe, 
> of course, anymore than it happens on a Windows system without cygwin 
> installed when using that executable.)
>
> I've opened a ticket about this on the twisted issue tracker as well:
>
> http://twistedmatrix.com/trac/ticket/3529 # closing stdout in a child 
> process on cygwin means that process doesn't receive bytes from stdin 
> anymore. I think.
>
> I've opened a ticket about this on the python issue tracker as well:
>
> http://bugs.python.org/issue4295 # closing stdout in a child process on 
> cygwin means that process doesn't receive bytes from stdin anymore. I 
> think.

I don't think I ever saw such an effect.  I'm not using python, though.
If it's really sure that this isn't a problem in python but in Cygwin
itself we would really need a self-contained testcase, preferrably in
plain C.  A simple, really short test script in python would be ok, too,
if plain C isn't an option for some reason.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019