X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 12 Nov 2010 16:34:10 +1300 Message-ID: Subject: Re: Python: subprocess running rsync causes broken socket in telnetlib From: David Antliff To: cygwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Fri, Nov 12, 2010 at 16:26, David Antliff wrot= e: > On Fri, Nov 12, 2010 at 16:19, David Antliff wrote: >> Then the script uses subprocess to do something else (the line is >> actually longer than this but I've simplified it to the most basic >> version that exhibits the problem): >> >> =A0 =A0process =3D subprocess.Popen("rsync", stdout=3Dsubprocess.PIPE) > > > FWIW, this function also exhibits the same problem: > > =A0 =A0subprocess.call("rsync") As does: os.system("rsync") And wrapping up rsync inside another script and calling that script also doesn't work around the problem either. This is a bit concerning as it means rewriting my scripts to avoid mixing the use of rsync with telnet, on Cygwin. Does anyone have any ideas why 'rsync' is special in this case? How can it affect an existing filehandle in a parent process? Isn't that a violation of process separation? -- David. -- 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