Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1.5
    • Fix Version/s: JRuby 1.2
    • Component/s: Windows
    • Labels:
      None
    • Environment:
      cygwin on win xp
    • Number of attachments :
      2

      Description

      Callin jirb from bash in cygwin does not work as expected: input/ouput chars do not echo on the terminal.
      It is discussed here http://www.weiqigao.com/blog/2008/04/08/your_jirb_groovysh_and_clj_commands_doesnt_work_in_cygwin.html .
      Apparently, the bug is due to the fact that JLine is not told to use the UnixTerminal class (see http://sourceforge.net/tracker/index.php?func=detail&aid=1822900&group_id=64033&atid=506056).

      The proposed workaround (see the links) works for me.

      1. jruby-2675.patch
        1 kB
        Charles Oliver Nutter
      2. jruby-2675.patch.fixed
        1 kB
        Julien Thewys

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Here's a patch based on weiqi's workaround which doesn't seem to break things on unix for me, but I don't have a system to test on. Can you confirm it works?

        Show
        Charles Oliver Nutter added a comment - Here's a patch based on weiqi's workaround which doesn't seem to break things on unix for me, but I don't have a system to test on. Can you confirm it works?
        Hide
        Julien Thewys added a comment -

        I just fixed 2 things:

        • the argument for stty is icanon, not canon
        • put $JAVA_CMD between double quotes as path may contain spaces (actually to be fixed in other part of the script).

        I have one more suggestion.
        The deletion of the "exec" call should be explained in comment so that when the workaround is not needed anymore we can put the "exec" back.
        An alternative could be to remove "exec" only if $cygwin, and keep it otherwise so that other Unix do not suffer from the additional unnecessary shell.

        Show
        Julien Thewys added a comment - I just fixed 2 things: the argument for stty is icanon, not canon put $JAVA_CMD between double quotes as path may contain spaces (actually to be fixed in other part of the script). I have one more suggestion. The deletion of the "exec" call should be explained in comment so that when the workaround is not needed anymore we can put the "exec" back. An alternative could be to remove "exec" only if $cygwin, and keep it otherwise so that other Unix do not suffer from the additional unnecessary shell.
        Hide
        Charles Oliver Nutter added a comment -

        I applied the updated patch and Julien's additional suggestion to separate out the non-exec'ed path so it only runs under cygwin. jruby and jirb appear to start up and work right (though I didn't seem to get history working...perhaps file a separate bug on that).

        Show
        Charles Oliver Nutter added a comment - I applied the updated patch and Julien's additional suggestion to separate out the non-exec'ed path so it only runs under cygwin. jruby and jirb appear to start up and work right (though I didn't seem to get history working...perhaps file a separate bug on that).

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Julien Thewys
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: