delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/02/19/18:48:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <36CDF573.361DC410@pdi.com>
Date: Fri, 19 Feb 1999 15:36:19 -0800
From: Curtis Galloway <curtis AT pdi DOT com>
X-Mailer: Mozilla 4.5 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Sergey Okhapkin <sos AT lab254 DOT bellcore DOT com>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Handling CTRL_LOGOFF_EVENT
References: <005001be5c4d$3bd4edc0$02af6080 AT sokhapki-1 DOT cc DOT bellcore DOT com>

Sergey Okhapkin wrote:
> CTRL_LOGOFF_EVENT is sent to every running application including services.

Yes, but does it terminate your process if you return FALSE in your handler?  I
don't think so.

I did a quick test using my modified cygwin1.dll.  I created a simple program
that does nothing but write log messages to a file, and installed it as a
service using the NT Resource Kit's SRVANY.EXE tool.  Even though my modified
event handler returns FALSE, my test service survived through logging out and
back in again.

Perhaps my test was invalid.  If so, I'd be happy to hear about it.  (I still
don't think the signal handling in exceptions.cc is quite right; it appears to
not give programs a chance to handle the CTRL_CLOSE_EVENT or
CTRL_SHUTDOWN_EVENT before Windows kills the process off.)

--Curtis

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019