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
|
||||
(JNIEnv *env, jclass cls, jint fd)
|
||||
{
|
||||
int res;
|
||||
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
|
||||
(JNIEnv *env, jclass cls, jint fd)
|
||||
{
|
||||
int res;
|
||||
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(close(fd), rc);
|
||||
close(fd);
|
||||
|
||||
/* release p here */
|
||||
if (isCopy) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user