X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.1 required=5.0 	tests=BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Rolf Campbell <rcampbell-cygwin@dragonwaveinc.com>
Subject:  Re: 1.7.1: terminal not passing Ctrl-C to sub-sub cygwin processes
Date:  Fri, 15 Jan 2010 21:50:52 -0500
Lines: 30
Message-ID: <hir9if$j90$1@ger.gmane.org>
References:  <hiqoi4$7c5$1@ger.gmane.org> <20100115232213.GA27594@ednor.casa.cgf.cx>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
In-Reply-To: <20100115232213.GA27594@ednor.casa.cgf.cx>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On 2010-01-15 18:22, Christopher Faylor wrote:
> On Fri, Jan 15, 2010 at 05:00:37PM -0500, Rolf Campbell wrote:
>>  From within cygwin python, if I call os.system running a cygwin
>> sub-process, and I hit Ctrl-C while that cygwin sub-process is running,
>> the Ctrl-C does nothing (absolutely nothing -- nothing is printed,
>> nothing terminates, no sound is made -- it's as if I didn't press the
>> key at all).
[snip]
>
> It probably isn't.  From the linux man page:
>
>    NAME
> 	 system - execute a shell command
>
>    SYNOPSIS
> 	 #include<stdlib.h>
>
> 	int system(const char *command);
>
>    DESCRIPTION
> 	  system() executes a command specified in command by calling /bin/sh -c
> 	  command, and returns after the command has been completed.  During
> 	  execution of the command, SIGCHLD will be blocked, and SIGINT and
> 	  SIGQUIT will be ignored.
>
> cgf
>

Thanks for setting me straight.  When I change my script to use 
os.popen, ^C gets propagated to sub-processes.


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

