This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 918e38c  Inherit I/O streams in functions process runtime (#2178)
918e38c is described below

commit 918e38c73c241c6707ffe41bf98f6b765506dc22
Author: Ivan Kelly <[email protected]>
AuthorDate: Tue Jul 17 22:55:13 2018 +0100

    Inherit I/O streams in functions process runtime (#2178)
    
    When running processes with the local runner, the output to stderr and
    stdout go nowhere. This makes it hard to debug startup issues.
    
    This patch modifies the process runtime to make the child process
    inherit the streams from the parent process, so the output will be
    visible to the runner.
---
 .../main/java/org/apache/pulsar/functions/runtime/ProcessRuntime.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/ProcessRuntime.java
 
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/ProcessRuntime.java
index 8054ff8..f3ed170 100644
--- 
a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/ProcessRuntime.java
+++ 
b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/ProcessRuntime.java
@@ -415,7 +415,7 @@ class ProcessRuntime implements Runtime {
     private void startProcess() {
         deathException = null;
         try {
-            ProcessBuilder processBuilder = new ProcessBuilder(processArgs);
+            ProcessBuilder processBuilder = new 
ProcessBuilder(processArgs).inheritIO();
             log.info("ProcessBuilder starting the process with args {}", 
String.join(" ", processBuilder.command()));
             process = processBuilder.start();
         } catch (Exception ex) {

Reply via email to