Skip to content

Commit 325ff9f

Browse files
fangereransalond
authored andcommitted
Fix: Return correct status code if timeout is given.
(cherry picked from commit 2c72d1b)
1 parent 8f555c1 commit 325ff9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ProcessSystemFunctionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private Object execute(String command, boolean intern, int timeoutSecs) {
7575
p.destroy();
7676
RError.warning(SHOW_CALLER, Message.COMMAND_TIMED_OUT, command, timeoutSecs);
7777
}
78-
rc = exited ? 0 : 127;
78+
rc = exited ? p.exitValue() : 127;
7979
} else {
8080
rc = p.waitFor();
8181
}

0 commit comments

Comments
 (0)