JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6913

with jdk 7, system commands run in windows use wrong line endings

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JRuby 1.7.0.RC2
    • Component/s: None
    • Labels:
      None
    • Environment:
      "jruby 1.7.0.RC1 (ruby-1.8.7p370) 2012-09-26 125fca0 on Java HotSpot(TM) Client VM 1.7.0_07-b11 [Windows 7-x86]"
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      Basically system commands should convert "\r\n" to "\n" in windows, and with jdk6, jruby does, but apparently not jdk7.

      $ "\Program Files (x86)\Java\jre7\bin\java.exe" -jar ..\..\..\jruby-complete-1.6.4.jar --1.8 -S irb
      irb(main):001:0> `ffmpeg -list_devices true -f dshow -i dummy 2>&1`
      => "ffmpeg version N-44080-gdfb4757 Copyright (c) 2000-2012 the FFmpeg developers\r\n built on Aug 31 2012 16:58:51 with gcc 4.7.1 (GCC)\r\n ..."

      Thanks. My guess is it's a jruby bug but who knows, it might be a jdk bug.
      roger

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Hmmm...on jdk7 we use a slightly different implementation of backquote that uses Java 7 process API to share TTY, etc. Perhaps there's some missing logic for line endings. Will investigate.

        Show
        Charles Oliver Nutter added a comment - Hmmm...on jdk7 we use a slightly different implementation of backquote that uses Java 7 process API to share TTY, etc. Perhaps there's some missing logic for line endings. Will investigate.
        Hide
        Charles Oliver Nutter added a comment -
        commit bfdbff53e4eb2cc8027200629ccda26267d7b230
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Fri Oct 5 12:15:34 2012 -0500
        
            Fix JRUBY-6913
            
            with jdk 7, system commands run in windows use wrong line endings
            
            The Ruby-based backquote logic did not have \r\n fixup.
        
        :000000 100644 0000000... aba6f55... A	spec/regression/JRUBY-6913_windows_backquote_newline_fixup_spec.rb
        :100644 100644 c742efd... 37577d6... M	src/jruby/kernel/jruby/process_manager.rb
        
        Show
        Charles Oliver Nutter added a comment - commit bfdbff53e4eb2cc8027200629ccda26267d7b230 Author: Charles Oliver Nutter <headius@headius.com> Date: Fri Oct 5 12:15:34 2012 -0500 Fix JRUBY-6913 with jdk 7, system commands run in windows use wrong line endings The Ruby-based backquote logic did not have \r\n fixup. :000000 100644 0000000... aba6f55... A spec/regression/JRUBY-6913_windows_backquote_newline_fixup_spec.rb :100644 100644 c742efd... 37577d6... M src/jruby/kernel/jruby/process_manager.rb

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Roger Pack
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: