A finer-grain -Xrs option

C

Chris Berg

Has anyone else had this problem:

Running a JAVA app as a system service on Windows, I have to add -Xrs
to the command-line to avoid the app to shut down when no user is
logged in. But this also prevents any shutdown hooks to run when the
system shuts down, because -Xrs not only inhibits CTRL_LOGOFF_EVENT,
but also CTRL_C_EVENT, CTRL_CLOSE_EVENT, and CTRL_SHUTDOWN_EVENT, the
last of which should be catched to enable the shutdown hook.

I would like a finer-grain -Xrs option. Until SUN gives me that (maybe
in 1.5?), are there any other ways around the problem?

Chris
 
T

Tris Orendorff

Chris Berg said:
Has anyone else had this problem:

Running a JAVA app as a system service on Windows, I have to add -Xrs
to the command-line to avoid the app to shut down when no user is
logged in. But this also prevents any shutdown hooks to run when the
system shuts down, because -Xrs not only inhibits CTRL_LOGOFF_EVENT,
but also CTRL_C_EVENT, CTRL_CLOSE_EVENT, and CTRL_SHUTDOWN_EVENT, the
last of which should be catched to enable the shutdown hook.

I would like a finer-grain -Xrs option. Until SUN gives me that (maybe
in 1.5?), are there any other ways around the problem?

This should help you: <http://www-106.ibm.com/developerworks/ibm/library/i-signalhandling/>.


--
Sincerely,

Tris Orendorff

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP t+ !5 X- R- tv--- b++
DI++ D+ G++ e++ h---- r+++ y+++
------END GEEK CODE BLOCK------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top