8327468: Do not restart close if errno is EINTR [macOS/linux]
Reviewed-by: dholmes, sspitsyn
This commit is contained in:
parent
44aef38623
commit
481c866df8
@ -192,9 +192,8 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_checkPermissions
|
|||||||
JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_close
|
JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_close
|
||||||
(JNIEnv *env, jclass cls, jint fd)
|
(JNIEnv *env, jclass cls, jint fd)
|
||||||
{
|
{
|
||||||
int res;
|
|
||||||
shutdown(fd, SHUT_RDWR);
|
shutdown(fd, SHUT_RDWR);
|
||||||
RESTARTABLE(close(fd), res);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -194,9 +194,8 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_checkPermissions
|
|||||||
JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_close
|
JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_close
|
||||||
(JNIEnv *env, jclass cls, jint fd)
|
(JNIEnv *env, jclass cls, jint fd)
|
||||||
{
|
{
|
||||||
int res;
|
|
||||||
shutdown(fd, SHUT_RDWR);
|
shutdown(fd, SHUT_RDWR);
|
||||||
RESTARTABLE(close(fd), res);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -288,8 +287,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
RESTARTABLE(chown(_path, geteuid(), getegid()), rc);
|
RESTARTABLE(chown(_path, geteuid(), getegid()), rc);
|
||||||
|
close(fd);
|
||||||
RESTARTABLE(close(fd), rc);
|
|
||||||
|
|
||||||
/* release p here */
|
/* release p here */
|
||||||
if (isCopy) {
|
if (isCopy) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user