Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2378

Shell:exec doesn't show output for commands that execute too quickly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0.RC1
    • 2.3.3, 2.4.0, 3.0.0
    • karaf
    • None
    • Ubuntu 13.04, jdk 7

    Description

      When using shell:exec, you don't see any output when the command you're executing is executing too fast.

      karaf@root()> shell:exec ls
      bin
      data
      demos
      deploy
      etc
      instances
      lib
      LICENSE
      lock
      NOTICE
      README
      RELEASE-NOTES
      system
      karaf@root()> shell:exec ls
      karaf@root()> 
      

      For example, using shell:exec ls doesn't return anything, but shell:exec du / does.

      Although, almost every time you first use shell:exec, you do get output on the console. If I add a Thread.sleep right before the p.waitFor in, it also consistently works.

      The cause must be related to the PumpStreamHandler.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            c.vanfleteren Christophe Vanfleteren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: