Jruby1.6.2 has "Bad file descriptor" error with ant 1.8.2 ---------------------------------------------------------
Key: JRUBY-5904 URL: https://jira.codehaus.org/browse/JRUBY-5904 Project: JRuby Issue Type: Bug Components: JRuby-extras Affects Versions: JRuby 1.6.2 Environment: windows xp,vista, ant1.8.1 Reporter: Andyma We are using JRuby with ant, it works very well with version 1.4.1, when upgrade to 1.6.2, we have many errors related to "Bad file descriptor", the stacktrace is as follow: [createupdatevcproj] Bad file descriptor - Bad file descriptor [createupdatevcproj] org/jruby/RubyIO.java:1330:in `write' [createupdatevcproj] <script>:31:in `(root)' [createupdatevcproj] org/jruby/RubyIO.java:1122:in `open' [createupdatevcproj] <script>:30:in `(root)' (<script> l.35) part of ant file: .... <for param="projectfile" parallel="true" threadCount="10"> <filelist refid="qmake.project.files" /> <sequential> <createupdatevcproj projectfile="@{projectfile}" /> </sequential> </for> ... the definition of "createupdatevcproj": <scriptdef name="createupdatevcproj" language="ruby"> <attribute name="projectfile" /> <![CDATA[ begin antdir = $project.getProperty("global.antdir") devtdir = $project.getProperty("global.devtools") qtdir = $project.getProperty("global.qtdir") rubydir = $project.getProperty("global.rubydir") mkspec = $project.getProperty("build.mkspec") ttbuild = $project.getProperty("global.basedir")+"/Build" projectfile = $attributes.get("projectfile") require antdir + "/antlogging.rb" require 'pathname' pro_dir = File.dirname(projectfile) pro_file = File.basename(projectfile) commands = "@echo off \n" commands += "set PATH=#{devtdir}/bin;%PATH% \n" commands += "set TTBUILD=#{ttbuild} \n" commands += "call #{qtdir}/bin/qtvars.bat vsvars\n" commands += "call #{rubydir}/bin/rubyvars.bat \n" commands += "qmake.exe " commands += "-tp vc -nodepend -norecursive -nomoc -spec #{mkspec} " commands += pro_file commands += "\n" File.open(pro_dir + "/" + "UpdateVCProj.bat", 'w') {|f| f.write(commands) } rescue => e error_message("#{e.message}\n#{e.backtrace.join("\n")}",__FILE__,__LINE__) end ]]> </scriptdef> I can't reproduce it with single ant script definition, I guess something happen when using mutithread with ant, our solution has hundreds of projects, many ant script with File operations report error saying "Bad file descriptor". -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email