mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug
Reviewed-by: martin
This commit is contained in:
parent
8cf153fbd5
commit
63b1edb7b7
4 changed files with 42 additions and 7 deletions
|
@ -507,8 +507,7 @@ final class ProcessImpl extends Process {
|
|||
|
||||
long deadline = System.nanoTime() + remainingNanos;
|
||||
do {
|
||||
// Round up to next millisecond
|
||||
wait(TimeUnit.NANOSECONDS.toMillis(remainingNanos + 999_999L));
|
||||
TimeUnit.NANOSECONDS.timedWait(this, remainingNanos);
|
||||
if (hasExited) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue