trap jvm kill signal

S

sai krishna

Hi All,

Is there a way to trap kill signals in java applications? when an
external kill signal is sent to a java process, how can we trap the
signal. i want to use this handler to gracefully close the application

Sai
 
G

Gordon Beaton

sai krishna wrote:
.

Runtime.addShutdownHook(java.lang.Thread)

However if the OP really means SIGKILL (9) on a Unix (-like) system,
then no process can trap that specific signal, regardless of
programming language.

/gordon

--
 
S

sai krishna

However if the OP really means SIGKILL (9) on a Unix (-like) system,
then no process can trap that specific signal, regardless of
programming language.

/gordon

--

Thanks you all for your replies
 

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,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top