• Post Reply Bookmark Topic Watch Topic
  • New Topic

High CPU usage when execute native command through java Runtime  RSS feed

 
Hacken Lee
Greenhorn
Posts: 2
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you guys met below problem, what's you investigation?

After issued a command of "kill -9 pid" using Runtime, it is not 100% reprocuced

try {
Process process = Runtime.getRuntime().exec("/bin/kill -9 " + pid);
int value = process.waitFor();
//hang here, and CPU is high , almost 100%
...
}


configurations:

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

SunOS 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V240
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"gossipgirl li " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!