由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - java & signal process
相关主题
Signal handler, thanksStack Frame of your JVM implementation
Is this a Bug or not?The shape of JVM stack frame
Top Ten Errors Java Programmers Make(5)Re: Can create a Interface object, why?
Where I can find comparison of JVMsTop Ten Errors Java Programmers Make(10)
如何显示load文件的正确进程Answer to "Is this a Bug or not? "
java and javascript 问题请教,有包子Answer 2 to "Is this a Bug or not? "
帮看看这个swing的小程序?Java's performance myth
An experiment with JVM Garbage Collection SchemesJVM
相关话题的讨论汇总
话题: signal话题: java话题: process话题: program话题: unix
进入Java版参与讨论
1 (共1页)
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
7
Thanks, ZeeGee
1 (共1页)
进入Java版参与讨论
相关主题
JVM如何显示load文件的正确进程
Re: system property in javajava and javascript 问题请教,有包子
Java questions 51-100帮看看这个swing的小程序?
[转载] 现在还有什么OS不是THREAD级调度的吗?An experiment with JVM Garbage Collection Schemes
Signal handler, thanksStack Frame of your JVM implementation
Is this a Bug or not?The shape of JVM stack frame
Top Ten Errors Java Programmers Make(5)Re: Can create a Interface object, why?
Where I can find comparison of JVMsTop Ten Errors Java Programmers Make(10)
相关话题的讨论汇总
话题: signal话题: java话题: process话题: program话题: unix