Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@sourceware.cygnus.com>
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-Id: <199910262101.QAA13016@tigris.pounder.sol.net>
To: Curtis Galloway <curtis@pdi.com>
Cc: cygwin@sourceware.cygnus.com
Cc: Sergey Okhapkin <sos@lab254.bellcore.com>
Reply-to: Tom Rodman <rodmant@sol.net>
From: Tom Rodman <rodmant@sol.net>
X-note: Return-Receipt-To: rodmant@sol.net
Subject: Re: Handling CTRL_LOGOFF_EVENT 
In-reply-to: Your message of "Fri, 19 Feb 1999 15:36:19 PST."
             <36CDF573.361DC410@pdi.com> 
Date: Tue, 26 Oct 1999 16:01:44 -0500


We're end-users of bash here at Johnson Controls. We are using our 
own rexec command to start a cmd file on a remote box; the cmd 
file launches our bash scripts just fine. We'd like to be able to 
have these bash scripts run as batch jobs in the background so 
rexec can return quickly on the client machine. When we try backgrounding
the bash script,
it silently dies (traps don't catch anything) when 
the rexec terminates. Is this due to the CTRL_LOGOFF_EVENT issue? 
Is there a workaround for us that would allow our bash scripts to 
be launched remotely with the permissions of the person requesting 
the job without keeping a network connection open for the duration 
of the job? 

		thanks,
                       Tom Rodman 
                       (414) 274-5041/fax:4400
 
                       Johnson Controls/ Milwaukee WI
                       work: Tom.Rodman@jci.com
                       home: rodmant@sol.net


On Fri 2/19/99 15:36 PST Curtis Galloway wrote:
>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@sourceware.cygnus.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

