Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Marineau2004-01-08 07:06:08 -0500
committerSebastien Marineau2004-01-08 07:06:08 -0500
commitc2090121417a9e628a6e5ac40e6c1ededf090e48 (patch)
tree5a6a9c21b84472b44a657beb2a95f630e7cba276 /core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
parent208055cbb32246d520684970fe29cb4bfc2fcbb4 (diff)
downloadorg.eclipse.cdt-c2090121417a9e628a6e5ac40e6c1ededf090e48.tar.gz
org.eclipse.cdt-c2090121417a9e628a6e5ac40e6c1ededf090e48.tar.xz
org.eclipse.cdt-c2090121417a9e628a6e5ac40e6c1ededf090e48.zip
Replace QNX copyright with standard CPL copyright.
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c61
1 files changed, 31 insertions, 30 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
index d5e9a410bf0..a78d83b2766 100644
--- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
+++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
@@ -1,13 +1,14 @@
-/* Copyright, 2002, QNX Software Systems Ltd. All Rights Reserved
-
- * This source code has been published by QNX Software Systems
- * Ltd. (QSSL). However, any use, reproduction, modification, distribution
- * or transfer of this software, or any software which includes or is based
- * upon any of this code, is only permitted if expressly authorized by a
- * written license agreement from QSSL. Contact the QNX Developer's Network
- * or contact QSSL's legal department for more information.
- *
- *
+/**********************************************************************
+ * Copyright (c) 2002,2003 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+***********************************************************************/
+/*
* Win32ProcessEx.c
*
* This is a JNI implementation of spawner
@@ -17,15 +18,15 @@
#include <stdlib.h>
#include <process.h>
#include "Spawner.h"
-
-
-#include "jni.h"
-#include "io.h"
+
+
+#include "jni.h"
+#include "io.h"
// #define DEBUG_MONITOR
-
+
#define PIPE_SIZE 512
-#define MAX_CMD_SIZE 2049
+#define MAX_CMD_SIZE 2049
#define MAX_ENV_SIZE 4096
#define MAX_PROCS (100)
@@ -71,7 +72,7 @@ static HMODULE hVM = NULL;
static pProcInfo_t pInfo = NULL;
-
+
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
(JNIEnv * env, jobject process, jobjectArray cmdarray, jobjectArray envp, jstring dir, jintArray channels)
{
@@ -569,13 +570,13 @@ 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);
@@ -589,21 +590,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