From 6710c39bd61f2492efd4e595863397985f2d2f00 Mon Sep 17 00:00:00 2001 From: Mick Jordan <mick.jordan@oracle.com> Date: Tue, 10 Mar 2015 09:16:46 -0700 Subject: [PATCH] inherit IO in system builtin --- .../oracle/truffle/r/nodes/builtin/base/SystemFunction.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java index 5aa4bb29be..a67fd4c4ff 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ package com.oracle.truffle.r.nodes.builtin.base; import java.io.*; +import java.lang.ProcessBuilder.*; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.dsl.*; @@ -43,6 +44,9 @@ public abstract class SystemFunction extends RBuiltinNode { shell = "/bin/sh"; } ProcessBuilder pb = new ProcessBuilder(shell, "-c", command.getDataAt(0)); + pb.redirectInput(Redirect.INHERIT); + pb.redirectOutput(Redirect.INHERIT); + pb.redirectError(Redirect.INHERIT); int rc; try { Process p = pb.start(); -- GitLab