mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 00:36:16 +02:00
Bug 347499 - Hard lock when creating new C/C++ project
This commit is contained in:
parent
7148e562db
commit
07a293ed5e
1 changed files with 3 additions and 2 deletions
|
@ -79,7 +79,7 @@ public final class Platform {
|
|||
Process unameProcess;
|
||||
String cmd[];
|
||||
if (org.eclipse.core.runtime.Platform.OS_WIN32.equals(getOS())) {
|
||||
cmd = new String[] {"cmd", "/c", "set", "PROCESSOR_ARCHITECTURE"}; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
cmd = new String[] {"cmd", "/d", "/c", "set", "PROCESSOR_ARCHITECTURE"}; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
||||
} else {
|
||||
// We don't use "uname -p" since it returns "unknown" on some Linux systems.
|
||||
cmd = new String[] {"uname", "-m"}; //$NON-NLS-1$//$NON-NLS-2$
|
||||
|
@ -87,7 +87,8 @@ public final class Platform {
|
|||
|
||||
try {
|
||||
unameProcess = Runtime.getRuntime().exec(cmd);
|
||||
|
||||
unameProcess.getOutputStream().close();
|
||||
unameProcess.getErrorStream().close();
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(unameProcess.getInputStream());
|
||||
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
|
||||
String unameOutput = bufferedReader.readLine();
|
||||
|
|
Loading…
Add table
Reference in a new issue