mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8244224: Implementation of JEP 381: Remove the Solaris and SPARC Ports
Reviewed-by: alanb, bchristi, dcubed, dfuchs, eosterlund, erikj, glaubitz, ihse, iignatyev, jjiang, kbarrett, ksrini, kvn, naoto, prr, rriggs, serb, sspitsyn, stefank, tschatzl, valeriep, weijun, weijun
This commit is contained in:
parent
9fe4b69c1a
commit
071bd521bc
954 changed files with 1093 additions and 127816 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, 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
|
||||
|
@ -77,9 +77,6 @@ final class ProcessImpl extends Process {
|
|||
private /* final */ InputStream stdout;
|
||||
private /* final */ InputStream stderr;
|
||||
|
||||
// only used on Solaris
|
||||
private /* final */ DeferredCloseInputStream stdout_inner_stream;
|
||||
|
||||
private static enum LaunchMechanism {
|
||||
// order IS important!
|
||||
FORK,
|
||||
|
@ -93,8 +90,6 @@ final class ProcessImpl extends Process {
|
|||
|
||||
BSD(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK),
|
||||
|
||||
SOLARIS(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK),
|
||||
|
||||
AIX(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK);
|
||||
|
||||
final LaunchMechanism defaultLaunchMechanism;
|
||||
|
@ -139,7 +134,6 @@ final class ProcessImpl extends Process {
|
|||
|
||||
if (osName.equals("Linux")) { return LINUX; }
|
||||
if (osName.contains("OS X")) { return BSD; }
|
||||
if (osName.equals("SunOS")) { return SOLARIS; }
|
||||
if (osName.equals("AIX")) { return AIX; }
|
||||
|
||||
throw new Error(osName + " is not a supported OS platform.");
|
||||
|
@ -385,41 +379,6 @@ final class ProcessImpl extends Process {
|
|||
});
|
||||
break;
|
||||
|
||||
case SOLARIS:
|
||||
stdin = (fds[0] == -1) ?
|
||||
ProcessBuilder.NullOutputStream.INSTANCE :
|
||||
new BufferedOutputStream(
|
||||
new FileOutputStream(newFileDescriptor(fds[0])));
|
||||
|
||||
stdout = (fds[1] == -1 || forceNullOutputStream) ?
|
||||
ProcessBuilder.NullInputStream.INSTANCE :
|
||||
new BufferedInputStream(
|
||||
stdout_inner_stream =
|
||||
new DeferredCloseInputStream(
|
||||
newFileDescriptor(fds[1])));
|
||||
|
||||
stderr = (fds[2] == -1) ?
|
||||
ProcessBuilder.NullInputStream.INSTANCE :
|
||||
new DeferredCloseInputStream(newFileDescriptor(fds[2]));
|
||||
|
||||
/*
|
||||
* For each subprocess forked a corresponding reaper task
|
||||
* is submitted. That task is the only thread which waits
|
||||
* for the subprocess to terminate and it doesn't hold any
|
||||
* locks while doing so. This design allows waitFor() and
|
||||
* exitStatus() to be safely executed in parallel (and they
|
||||
* need no native code).
|
||||
*/
|
||||
ProcessHandleImpl.completion(pid, true).handle((exitcode, throwable) -> {
|
||||
synchronized (this) {
|
||||
this.exitcode = (exitcode == null) ? -1 : exitcode.intValue();
|
||||
this.hasExited = true;
|
||||
this.notifyAll();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
break;
|
||||
|
||||
case AIX:
|
||||
stdin = (fds[0] == -1) ?
|
||||
ProcessBuilder.NullOutputStream.INSTANCE :
|
||||
|
@ -522,29 +481,6 @@ final class ProcessImpl extends Process {
|
|||
try { stderr.close(); } catch (IOException ignored) {}
|
||||
break;
|
||||
|
||||
case SOLARIS:
|
||||
// There is a risk that pid will be recycled, causing us to
|
||||
// kill the wrong process! So we only terminate processes
|
||||
// that appear to still be running. Even with this check,
|
||||
// there is an unavoidable race condition here, but the window
|
||||
// is very small, and OSes try hard to not recycle pids too
|
||||
// soon, so this is quite safe.
|
||||
synchronized (this) {
|
||||
if (!hasExited)
|
||||
processHandle.destroyProcess(force);
|
||||
try {
|
||||
stdin.close();
|
||||
if (stdout_inner_stream != null)
|
||||
stdout_inner_stream.closeDeferred(stdout);
|
||||
if (stderr instanceof DeferredCloseInputStream)
|
||||
((DeferredCloseInputStream) stderr)
|
||||
.closeDeferred(stderr);
|
||||
} catch (IOException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default: throw new AssertionError("Unsupported platform: " + platform);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2020, 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
|
||||
|
@ -46,9 +46,6 @@ public final class PortConfig {
|
|||
if (os.startsWith("Linux")) {
|
||||
defaultLower = 32768;
|
||||
defaultUpper = 61000;
|
||||
} else if (os.startsWith("SunOS")) {
|
||||
defaultLower = 32768;
|
||||
defaultUpper = 65535;
|
||||
} else if (os.contains("OS X")) {
|
||||
defaultLower = 49152;
|
||||
defaultUpper = 65535;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2020, 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
|
||||
|
@ -177,16 +177,6 @@ public class ResolverConfigurationImpl
|
|||
|
||||
// No search keyword so use local domain
|
||||
|
||||
|
||||
// LOCALDOMAIN has absolute priority on Solaris
|
||||
|
||||
String localDomain = localDomain0();
|
||||
if (localDomain != null && !localDomain.isEmpty()) {
|
||||
sl = new LinkedList<>();
|
||||
sl.add(localDomain);
|
||||
return sl;
|
||||
}
|
||||
|
||||
// try domain keyword in /etc/resolv.conf
|
||||
|
||||
sl = java.security.AccessController.doPrivileged(
|
||||
|
@ -254,8 +244,6 @@ public class ResolverConfigurationImpl
|
|||
|
||||
// --- Native methods --
|
||||
|
||||
static native String localDomain0();
|
||||
|
||||
static native String fallbackDomain0();
|
||||
|
||||
static {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, 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
|
||||
|
@ -31,10 +31,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* On Solaris, "sun" is defined as a macro. Undefine to make package
|
||||
declaration valid */
|
||||
#undef sun
|
||||
|
||||
/* To be able to name the Java constants the same as the C constants without
|
||||
having the preprocessor rewrite those identifiers, add PREFIX_ to all
|
||||
identifiers matching a C constant. The PREFIX_ is filtered out in the
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, 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
|
||||
|
@ -92,10 +92,6 @@ abstract class UnixFileSystem
|
|||
return rootDirectory;
|
||||
}
|
||||
|
||||
boolean isSolaris() {
|
||||
return false;
|
||||
}
|
||||
|
||||
static List<String> standardFileAttributeViews() {
|
||||
return Arrays.asList("basic", "posix", "unix", "owner");
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, 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
|
||||
|
@ -801,15 +801,7 @@ class UnixPath implements Path {
|
|||
("NOFOLLOW_LINKS is not supported on this platform");
|
||||
flags |= O_NOFOLLOW;
|
||||
}
|
||||
try {
|
||||
return open(this, flags, 0);
|
||||
} catch (UnixException x) {
|
||||
// HACK: EINVAL instead of ELOOP on Solaris 10 prior to u4 (see 6460380)
|
||||
if (getFileSystem().isSolaris() && x.errno() == EINVAL)
|
||||
x.setError(ELOOP);
|
||||
|
||||
throw x;
|
||||
}
|
||||
return open(this, flags, 0);
|
||||
}
|
||||
|
||||
void checkRead() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, 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
|
||||
|
@ -33,7 +33,7 @@ import java.util.Arrays;
|
|||
import sun.security.util.Debug;
|
||||
|
||||
/**
|
||||
* Native PRNG implementation for Solaris/Linux/MacOS.
|
||||
* Native PRNG implementation for Linux/MacOS.
|
||||
* <p>
|
||||
* It obtains seed and random numbers by reading system files such as
|
||||
* the special device files /dev/random and /dev/urandom. This
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue