This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes High CPU usage when execute native command through java Runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "High CPU usage when execute native command through java Runtime" Watch "High CPU usage when execute native command through java Runtime" New topic
Author

High CPU usage when execute native command through java Runtime

Hacken Lee
Greenhorn

Joined: Jan 18, 2009
Posts: 2

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

Joined: Jun 06, 2007
Posts: 2716
    
    6

"gossipgirl li " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
 
wood burning stoves
 
subject: High CPU usage when execute native command through java Runtime
 
Similar Threads
Getting Version Numbers
Unsupported major.minor version 50.0
Is there a bug with javaws on Fedora Core 8?
Java version
Regex start() + group() question