x******o 发帖数: 31 | 1 dose java has signal process like unix system call.
For example, if i run a java program in a jvm and send -9 to the running
process,
how to let the java program responses to -9 signal?
Thanks, |
x******o 发帖数: 31 | 2 re
【在 x******o 的大作中提到】 : dose java has signal process like unix system call. : For example, if i run a java program in a jvm and send -9 to the running : process, : how to let the java program responses to -9 signal? : Thanks,
|
x******o 发帖数: 31 | 3 any body know this issue?
dose java has signal process like unix system call.
For example, if i run a java program in a jvm and send -9 to the running
process,
how to let the java program responses to -9 signal? |
l********0 发帖数: 283 | 4 发给program的signal,是在call的时候,还是运行过程中?
【在 x******o 的大作中提到】 : any body know this issue? : dose java has signal process like unix system call. : For example, if i run a java program in a jvm and send -9 to the running : process, : how to let the java program responses to -9 signal?
|
x******o 发帖数: 31 | 5 let's say that i have one process running at backend
(it is a java program like start from command line by:
java -cp ... MyJava.class) and suppose this process id is 101.
now, i send the signal from command line (on unix):
kill -9 101
how can i let MyJava.class response to -9 signal?
I think that JVM will take -9 signal at first and there is no ways for
MyJava.class to response -9 signal in this case.
So is there any other way for java program (like MyJava.class) to response
signal?
Thanks |
Z****e 发帖数: 2999 | 6 "Two signals are unable to be redefined by a signal handler. SIGKILL always
stops a process and SIGSTOP always moves a process from the foreground to
the background. These two signals cannot be "caught" by a signal handler."
so there you go, unix process cannot trap SIGKIL
I think it's prossible to trap other signals by using sun.misc.Signal
【在 x******o 的大作中提到】 : let's say that i have one process running at backend : (it is a java program like start from command line by: : java -cp ... MyJava.class) and suppose this process id is 101. : now, i send the signal from command line (on unix): : kill -9 101 : how can i let MyJava.class response to -9 signal? : I think that JVM will take -9 signal at first and there is no ways for : MyJava.class to response -9 signal in this case. : So is there any other way for java program (like MyJava.class) to response : signal?
|
x******o 发帖数: 31 | |