RFR: SKARA-5 Remove pipeline support from process
Erik Duveblad via github.com
duke at openjdk.java.net
Wed Jun 26 12:10:44 UTC 2019
On Tue, 25 Jun 2019 00:49:17 GMT, Jeyvison Nascimento via github.com <duke at openjdk.java.net> wrote:
> Hey Folks :) Is that what you meant with removing pipeline support? If it's not, let me know. Also, I think something must be changed in ProcessBuilder, am i right? And this PR has a test problem i'm not able to fix but if any of you give me some directions i can fix it and resend :)
>
> ----------------
>
> Commits:
> - cf6700bd: SKARA-5 Remove pipeline support from process
>
> Pull request:
> https://github.com/openjdk/skara/pull/2
>
> Webrev:
> https://openjdk.github.io/cr/skara/2/webrev.00
>
> Patch:
> https://github.com/openjdk/skara/pull/2.diff
>
> Fetch command:
> git fetch https://github.com/openjdk/skara.git cf6700bd:pr/2
process/src/main/java/org/openjdk/skara/process/Execution.java line 15:
> 14: *
> 15: * You should have received a copy of the GNU General Public License version
> 16: * 2 along with this work; if not, write to the Free Software Foundation,
This can also be made into a single `File stderrFile`, we no longer need the a list here (that was only used to support pipelines)
process/src/main/java/org/openjdk/skara/process/Execution.java line 103:
> 102:
> 103: public int status() {
> 104: return status;
So this would become essentially like the standard output case, `stderrFile = File.createTempFile("stderr", ".txt")`
process/src/main/java/org/openjdk/skara/process/Execution.java line 124:
> 123: stderrFiles.add(stderrFile);
> 124: processBuilder.redirectError(stderrFile);
> 125: } else if (outputOption == Process.OutputOption.INHERIT) {
We can also remove the field `private List<java.lang.Process> processes` now, that can just be turned into `private java.lang.Process process` (the list was only there to support pipelines).
process/src/main/java/org/openjdk/skara/process/Execution.java line 135:
> 134: cmd = String.join(" ", processBuilder.command());
> 135: log.fine("Executing '" + cmd + "'");
> 136:
Can't you just the field `cmd` here instead that you updated on line 134?
More information about the skara-dev
mailing list