This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygrunsrv V0.95 bug (dll ver 1.3.12-2)

On Wed, 11 Sep 2002, dan ''dante'' tenenbaum wrote:

> I created a couple of services using cygrunsrv V0.95 (cygwin dll version 
> 1.3.12-2) under Windows 2000.
> When I log off, those services are stopped. 
> One of the services is a Java application. I understand that there is a 
> common bug with many service wrappers, something to do with NT 
> CTRL_LOGOFF_EVENT . Is that what this is and is there any way to work 
> around it?

I hope the information below can help...

Quote 1 (MSDN):
For WIN32 graphical applications: when the currently logged-in user is
logging-off, all WIN32 top-level windows receive WM_QUERYENDSESSION and
WM_ENDSESSION messages. Some WIN32 applications choose to terminate upon
receipt of such messages. In order for your WIN32 application to survive
logoff, it must not do that: instead, your windows procedure should call 
default windows procedure on these messages.
For WIN32 Console (i.e. character-mode) applications: when the currently
logged-in user is logging-off, all Console applications receive a
CTRL_LOGOFF_EVENT event from the Console. 

If your Console application has registered a Console event handler (via
SetConsoleCtrlHandler), it must ignore CTRL_LOGOFF_EVENT in order to 
the logoff.

Quote 2:
Bug 4323062: Any Windows NT Service embedding Java VM aborts when user 
logs out

            This bug has been fixed in J2SDK 1.3.1. In order to enable the 
the -Xrs command-line option must be passed to the JVM. The additional 
line argument is
            necessary because the fix necessarily disables the J2SDK 1.3
shutdown hooks mechanism and forbids the use of the sun.misc.Signal class. 
more background,
            please see at least the last section of the evaluation on the 


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]