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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top