aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/windows/jni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/windows/jni')
-rw-r--r--src/main/java/com/google/devtools/build/lib/windows/jni/WindowsProcesses.java25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/windows/jni/WindowsProcesses.java b/src/main/java/com/google/devtools/build/lib/windows/jni/WindowsProcesses.java
index 1eaab25904..bb13941bcb 100644
--- a/src/main/java/com/google/devtools/build/lib/windows/jni/WindowsProcesses.java
+++ b/src/main/java/com/google/devtools/build/lib/windows/jni/WindowsProcesses.java
@@ -33,7 +33,6 @@ public class WindowsProcesses {
* Windows path with a drive letter (e.g. "c:\foo\bar app.exe") or a single file name (e.g.
* "foo app.exe")
* @param argvRest the rest of the command line, i.e. argv[1:] (needs to be quoted Windows style)
- * @param commandLine the command line (needs to be quoted Windows style)
* @param env the environment of the new process. null means inherit that of the Bazel server
* @param cwd the working directory of the new process. if null, the same as that of the current
* process
@@ -41,16 +40,36 @@ public class WindowsProcesses {
* work.
* @param stderrFile the file the stdout should be redirected to. if null, nativeReadStderr will
* work.
+ * @param redirectErrorStream whether we merge the process's standard error and standard output.
* @return the opaque identifier of the created process
*/
public static long createProcess(
+ String argv0,
+ String argvRest,
+ byte[] env,
+ String cwd,
+ String stdoutFile,
+ String stderrFile,
+ boolean redirectErrorStream) {
+ WindowsJniLoader.loadJni();
+ return nativeCreateProcess(
+ argv0, argvRest, env, cwd, stdoutFile, stderrFile, redirectErrorStream);
+ }
+
+ public static long createProcess(
String argv0, String argvRest, byte[] env, String cwd, String stdoutFile, String stderrFile) {
WindowsJniLoader.loadJni();
- return nativeCreateProcess(argv0, argvRest, env, cwd, stdoutFile, stderrFile);
+ return nativeCreateProcess(argv0, argvRest, env, cwd, stdoutFile, stderrFile, false);
}
private static native long nativeCreateProcess(
- String argv0, String argvRest, byte[] env, String cwd, String stdoutFile, String stderrFile);
+ String argv0,
+ String argvRest,
+ byte[] env,
+ String cwd,
+ String stdoutFile,
+ String stderrFile,
+ boolean redirectErrorStream);
/**
* Writes data from the given array to the stdin of the specified process.