diff options
author | Thomas Watson | 2013-08-20 21:19:10 +0000 |
---|---|---|
committer | Thomas Watson | 2013-08-20 21:19:10 +0000 |
commit | 15da1929b38b272e3c7606ec956d6ab89ea12966 (patch) | |
tree | 7ac77cc8b0a5efb206986c7dff0710eb8f7d5c65 | |
parent | 57d2d493af0eb563c4012e3f87df8aebe715a0b5 (diff) | |
download | rt.equinox.framework-15da1929b38b272e3c7606ec956d6ab89ea12966.tar.gz rt.equinox.framework-15da1929b38b272e3c7606ec956d6ab89ea12966.tar.xz rt.equinox.framework-15da1929b38b272e3c7606ec956d6ab89ea12966.zip |
Bug 415527 - Need to make sure gosh.args are set appropriately
(--nointernactive --noshutdown)
2 files changed, 12 insertions, 8 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java index b4056f969..44333b900 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/ConsoleManager.java @@ -36,14 +36,6 @@ public class ConsoleManager { this.context = context; if (!"true".equals(enabled) || "none".equals(consolePort)) { //$NON-NLS-1$ //$NON-NLS-2$ this.consoleBundle = "false".equals(enabled) ? CONSOLE_BUNDLE : enabled; //$NON-NLS-1$ - if (consolePort == null || consolePort.length() > 0) { - // no -console was specified or it has specified none or a port for telnet; - // need to make sure the gogo shell does not create an interactive console on standard in/out - equinoxConfig.setProperty("gosh.args", "--nointeractive"); //$NON-NLS-1$//$NON-NLS-2$ - } else { - // Need to make sure we don't shutdown the framework if no console is around (bug 362412) - equinoxConfig.setProperty("gosh.args", "--noshutdown"); //$NON-NLS-1$//$NON-NLS-2$ - } return; } this.consoleBundle = "unknown"; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java index 00663d193..a381133a7 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java @@ -26,6 +26,7 @@ import java.lang.reflect.Method; import java.net.*; import java.security.CodeSource; import java.util.*; +import org.eclipse.core.runtime.internal.adaptor.ConsoleManager; import org.eclipse.osgi.framework.internal.core.Msg; import org.eclipse.osgi.internal.debug.Debug; import org.eclipse.osgi.internal.debug.FrameworkDebugOptions; @@ -764,6 +765,17 @@ public class EquinoxConfiguration implements EnvironmentInfo { configuration.put(PROP_OSGI_ARCH, archValue); } initializeStateSaveDelayIntervalProperty(configuration); + + String consoleProp = configuration.getProperty(ConsoleManager.PROP_CONSOLE); + consoleProp = consoleProp == null ? null : consoleProp.trim(); + if (consoleProp == null || consoleProp.length() > 0) { + // no -console was specified or it has specified none or a port for telnet; + // need to make sure the gogo shell does not create an interactive console on standard in/out + configuration.put("gosh.args", "--nointeractive"); //$NON-NLS-1$//$NON-NLS-2$ + } else { + // Need to make sure we don't shutdown the framework if no console is around (bug 362412) + configuration.put("gosh.args", "--noshutdown"); //$NON-NLS-1$//$NON-NLS-2$ + } } private static String getFrameworkPath(String path, boolean parent) { |