Skip to content

Commit

Permalink
Inherit I/O streams in functions process runtime (apache#2178)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ivankelly authored and merlimat committed Jul 17, 2018
1 parent d5536cc commit 918e38c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public void onSuccess(InstanceCommunication.HealthCheckResult t) {
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) {
Expand Down

0 comments on commit 918e38c

Please sign in to comment.