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

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/

