diff --git a/changelog.html b/changelog.html index 083f97cf56..5482f2169f 100644 --- a/changelog.html +++ b/changelog.html @@ -43,6 +43,9 @@ Upcoming changes
  • " (from WhateverTest)" gratuitously appended to test result detail pages. (issue 5655) +
  • + Fixed a pipe leak to child processes. + (issue 8244)
  • Debian package init script now honors ~/.profile.
  • diff --git a/core/src/main/java/hudson/Proc.java b/core/src/main/java/hudson/Proc.java index 73679ac8ad..25726c3833 100644 --- a/core/src/main/java/hudson/Proc.java +++ b/core/src/main/java/hudson/Proc.java @@ -200,6 +200,10 @@ public abstract class Proc { copier2 = new StreamCopyThread(name+": stderr copier", proc.getErrorStream(), err); copier2.start(); } else { + // while this is not discussed in javadoc, even with ProcessBuilder.redirectErrorStream(true), + // Process.getErrorStream() still returns a distinct reader end of a pipe that needs to be closed. + // this is according to the source code of JVM + proc.getErrorStream().close(); copier2 = null; } }