提交 8b410317 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-8420] recording 3c5c2c5c

上级 3c5c2c5c
......@@ -58,6 +58,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class='major bug'>
On IBM JDKs, Jenkins incorrectly ended up closing stdout to read from forked processes.
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-8420">issue 8420</a>)
<li class=bug>
Jenkins was unable to kill/list up native processses on 64bit Mac JVMs.
<li class=bug>
......
......@@ -202,12 +202,12 @@ public abstract class Proc {
copier2 = new StreamCopyThread(name+": stderr copier", procErrorStream, err);
copier2.start();
} else {
// On IBM JDK5, returned input and error streams might be the same.
// So, in this case, closing one isn't a good idea since it will close both.
// the javadoc is unclear about what getErrorStream() returns when ProcessBuilder.redirectErrorStream(true),
//
// according to the source code, Sun JREs still still returns a distinct reader end of a pipe that needs to be closed.
// but apparently at least on some IBM JDK5, returned input and error streams are the same.
// so try to close them smartly
if (procErrorStream!=procInputStream) {
// 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 HotSpot JVM
procErrorStream.close();
}
copier2 = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册