delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/11/11/22:34:23

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: <AANLkTikgmYd+_F0YsoQeL6KFmnE64nDXmmVN4A=fHrWZ@mail.gmail.com>
References: <AANLkTimFje-2WQ00q99zFS4LP9t8ACKmoBFKAZtM+AA5 AT mail DOT gmail DOT com> <AANLkTikgmYd+_F0YsoQeL6KFmnE64nDXmmVN4A=fHrWZ AT mail DOT gmail DOT com>
Date: Fri, 12 Nov 2010 16:34:10 +1300
Message-ID: <AANLkTinw92XybF1NGi3BWmknyRLfPOoVjFPj1A4yiDNs@mail.gmail.com>
Subject: Re: Python: subprocess running rsync causes broken socket in telnetlib
From: David Antliff <david DOT antliff AT gmail DOT com>
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
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 Fri, Nov 12, 2010 at 16:26, David Antliff <david DOT antliff AT gmail DOT com> 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

- Raw text -


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