www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/13/12:02:54

X-Spam-Check-By: sourceware.org
Message-ID: <11582466.post@talk.nabble.com>
Date: Fri, 13 Jul 2007 09:02:29 -0700 (PDT)
From: patrickinminneapolis <patrickinminneapolis AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: kill -2 is too powerful
In-Reply-To: <20070713142924.GD13962@ednor.casa.cgf.cx>
MIME-Version: 1.0
X-Nabble-From: patrickinminneapolis AT gmail DOT com
References: <11574352 DOT post AT talk DOT nabble DOT com> <20070713142924 DOT GD13962 AT ednor DOT casa DOT cgf DOT cx>
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 Thu, Jul 12, 2007 at 11:58:15PM -0700, patrickinminneapolis wrote:
>I have a VB.net Console App which catches "Ctrl-C" and then gives the
>user an option "e(x)it \ (r)un".  I learned that I needed to set CYGWIN
>= "notty" and so now the console app catches Ctrl-C properly within a
>Cygwin console.  I need to run the program as a service however, net
>start IB, and then I use pslist to view its process number and do a
>kill -2 PID I was hoping for my exit/run prompt, but it terminated
>instead.  Does anyone know what's going on or a better way to do this
>without reprogramming the VB.NET code?

Cygwin kills non-cygwin processes when it is processing an unhandled
CTRL-C.  It's worked that way for years and I, for one, rely on that
behavior.

This is one case where we can't accommodate native windows programs
perfectly.


Do you know of a way to gain control of a service started by cygrunsrv so
that I could do a manual control-c -- like maybe redirect tty to a service?
The app does work in cygwin with ctrl-c, I just lose control of my ability
to hit ctrl-c when I run it as a service (which is what I think I have to do
since I want to start it from ssh and have my ssh call not hang
indefinately). 


-- 
View this message in context: http://www.nabble.com/kill--2-is-too-powerful-tf4072624.html#a11582466
Sent from the Cygwin Users mailing list archive at Nabble.com.


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