Skip to content

Commit

Permalink
8276651: java/lang/ProcessHandle tests fail with "RuntimeException: I…
Browse files Browse the repository at this point in the history
…nput/output error" in java.lang.ProcessHandleImpl$Info.info0

Backport-of: d24b7b7026cf85f1aecf44f60819762872cfd5c1
  • Loading branch information
MBaesken committed Aug 29, 2023
1 parent e1b839e commit 89a88f0
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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");
}
Expand Down Expand Up @@ -300,4 +301,3 @@ void os_getCmdlineAndUserInfo(JNIEnv *env, jobject jinfo, pid_t pid) {
// Free the arg buffer
free(args);
}

1 comment on commit 89a88f0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.