Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
index 5add853cbb..50351fafbc 100644
--- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
+++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002 - 2005 QNX Software Systems and others.
+ * Copyright (c) 2002, 2006 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,20 +12,20 @@
* Win32ProcessEx.c
*
* This is a JNI implementation of spawner
-***********************************************************************/
+ *******************************************************************************/
#include "stdafx.h"
#include <string.h>
#include <stdlib.h>
#include <process.h>
#include "Spawner.h"
-
-#include "jni.h"
-#include "io.h"
-
+#include "jni.h"
+#include "io.h"
+
+
#define PIPE_SIZE 512 // Size of pipe buffer
-#define MAX_CMD_SIZE 2049 // Initial size of command line
+#define MAX_CMD_SIZE 2049 // Initial size of command line
#define MAX_ENV_SIZE 4096 // Initial size of environment block
#define PIPE_NAME_LENGTH 100 // Size of pipe name buffer
#define PIPE_TIMEOUT 10000 // Default time-out value, in milliseconds.
@@ -95,13 +95,13 @@ static int nCounter = 0; // We use it to build unique synchronisation object nam
// [in] envp - array of environment variables
// [in] dir - working directory
// [out] channels - streams handlers
-/////////////////////////////////////////////////////////////////////////////////////
-
+/////////////////////////////////////////////////////////////////////////////////////
+
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec2
(JNIEnv * env, jobject process, jobjectArray cmdarray, jobjectArray envp, jstring dir, jintArray channels, jstring slaveName, jint fdm)
-{
- return -1;
-}
+{
+ return -1;
+}
void ensureSize(_TCHAR** ptr, int* psize, int requiredLength)
{
@@ -120,7 +120,7 @@ void ensureSize(_TCHAR** ptr, int* psize, int requiredLength)
}
}
}
-
+
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
(JNIEnv * env, jobject process, jobjectArray cmdarray, jobjectArray envp, jstring dir, jintArray channels)
{
@@ -690,8 +690,8 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_raise
}
-
-
+
+
/////////////////////////////////////////////////////////////////////////////////////
// Wait for process termination
// Arguments: (see Spawner.java)
@@ -699,9 +699,9 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_raise
/////////////////////////////////////////////////////////////////////////////////////
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_waitFor
(JNIEnv * env, jobject process, jint uid)
-{
- long exit_code;
- int what=0;
+{
+ long exit_code;
+ int what=0;
HANDLE hProc;
pProcInfo_t pCurProcInfo = findProcInfo(uid);
@@ -715,21 +715,21 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_waitFor
what = WaitForSingleObject(hProc, INFINITE);
-
+
if (what == WAIT_OBJECT_0)
- {
- GetExitCodeProcess(hProc, &exit_code);
+ {
+ GetExitCodeProcess(hProc, &exit_code);
}
if(hProc)
CloseHandle(hProc);
- return exit_code;
-}
-
-
-
+ return exit_code;
+}
+
+
+
// Utilities

Back to the top