8276651: java/lang/ProcessHandle tests fail with "RuntimeException: Input/output error" in java.lang.ProcessHandleImpl$Info.info0
Reviewed-by: jpai, alanb
This commit is contained in:
parent
8a45abd5f3
commit
d24b7b7026
@ -272,7 +272,8 @@ void os_getCmdlineAndUserInfo(JNIEnv *env, jobject jinfo, pid_t pid) {
|
||||
mib[2] = pid;
|
||||
size = (size_t) maxargs;
|
||||
if (sysctl(mib, 3, args, &size, NULL, 0) == -1) {
|
||||
if (errno != EINVAL) {
|
||||
if (errno != EINVAL && errno != EIO) {
|
||||
// If the pid is invalid, the information returned is empty and no exception
|
||||
JNU_ThrowByNameWithLastError(env,
|
||||
"java/lang/RuntimeException", "sysctl failed");
|
||||
}
|
||||
@ -300,4 +301,3 @@ void os_getCmdlineAndUserInfo(JNIEnv *env, jobject jinfo, pid_t pid) {
|
||||
// Free the arg buffer
|
||||
free(args);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user