delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/15/12:27:56

X-Spam-Check-By: sourceware.org
Date: Wed, 15 Feb 2006 18:28:01 +0100
From: Samuel Thibault <samuel DOT thibault AT ens-lyon DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: How can I detect cygwin windows closing
Message-ID: <20060215172801.GB4216@implementation.labri.fr>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <IUQO3D$3229FE7442A884A3059FA6B8A047098B AT laposte DOT net>
Mime-Version: 1.0
In-Reply-To: <IUQO3D$3229FE7442A884A3059FA6B8A047098B@laposte.net>
User-Agent: Mutt/1.5.11
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Hi,

Wilfried Fauvel, le Wed 15 Feb 2006 18:18:49 +0100, a écrit :
> I have made a console apps, and I would like to know if it's possible to detect when the user click on the 'X' of the term window ?
> I am catching SIGINT, SIGTERM and SIGKILL signals, but it does not seen to be enough.

See SetConsoleCtrlHandler() and friends. I however never found a way to
avoid being killed anyway, even by trying to detach from the console.

Regards,
Samuel

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