--- old/src/java.base/share/native/libjava/Thread.c 2019-10-29 02:51:45.374819122 -0400 +++ new/src/java.base/share/native/libjava/Thread.c 2019-10-29 02:51:44.217805492 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,6 @@ {"currentThread", "()" THD, (void *)&JVM_CurrentThread}, {"countStackFrames", "()I", (void *)&JVM_CountStackFrames}, {"interrupt0", "()V", (void *)&JVM_Interrupt}, - {"isInterrupted", "(Z)Z", (void *)&JVM_IsInterrupted}, {"holdsLock", "(" OBJ ")Z", (void *)&JVM_HoldsLock}, {"getThreads", "()[" THD, (void *)&JVM_GetAllThreads}, {"dumpThreads", "([" THD ")[[" STE, (void *)&JVM_DumpThreads}, @@ -69,3 +68,12 @@ { (*env)->RegisterNatives(env, cls, methods, ARRAY_LENGTH(methods)); } + +JNIEXPORT void JNICALL +Java_java_lang_Thread_clearInterruptEvent(JNIEnv *env, jclass cls) +{ +#if defined(_WIN32) + // Need to reset the interrupt event used by Process.waitFor + ResetEvent((HANDLE) JVM_GetThreadInterruptEvent()); +#endif +}