delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/15/18:22:33

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 15 Jan 2010 18:22:13 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.1: terminal not passing Ctrl-C to sub-sub cygwin processes
Message-ID: <20100115232213.GA27594@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <hiqoi4$7c5$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <hiqoi4$7c5$1@ger.gmane.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
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, 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).
>
>I've attached a simple script which easily reproduces the situation. 
>When I run the script as "./ctrlc.py 0", Ctrl-C kill the process, but 
>when I run it with an argument of 1 or more, hitting Ctrl-C has no effect.
>
>I have not testing this with anything other than python, but I have a 
>feeling that it's not python related.

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

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