< prev index next > src/java.base/windows/classes/java/lang/ProcessImpl.java
Print this page
else {
FileDescriptor stdin_fd = new FileDescriptor();
fdAccess.setHandle(stdin_fd, stdHandles[0]);
fdAccess.registerCleanup(stdin_fd);
stdin_stream = new BufferedOutputStream(
- new FileOutputStream(stdin_fd));
+ new PipeOutputStream(stdin_fd));
}
if (stdHandles[1] == -1L || forceNullOutputStream)
stdout_stream = ProcessBuilder.NullInputStream.INSTANCE;
else {
return exitCode;
}
private static native int getExitCodeProcess(long handle);
public int waitFor() throws InterruptedException {
- long comp = Blocker.begin();
+ boolean attempted = Blocker.begin();
try {
waitForInterruptibly(handle);
} finally {
- Blocker.end(comp);
+ Blocker.end(attempted);
}
if (Thread.interrupted())
throw new InterruptedException();
return getExitCodeProcess(handle);
}
long msTimeout = TimeUnit.NANOSECONDS.toMillis(remainingNanos + 999_999L);
if (msTimeout < 0) {
// if wraps around then wait a long while
msTimeout = Integer.MAX_VALUE;
}
- long comp = Blocker.begin();
+ boolean attempted = Blocker.begin();
try {
waitForTimeoutInterruptibly(handle, msTimeout);
} finally {
- Blocker.end(comp);
+ Blocker.end(attempted);
}
if (Thread.interrupted())
throw new InterruptedException();
if (getExitCodeProcess(handle) != STILL_ACTIVE) {
return true;
< prev index next >