Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

High CPU usage when execute native command through java Runtime

 
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: 2854
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic