Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3618

waitForOrKill() not working properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.6.3
    • 1.6.3
    • None
    • None
    • Linux Enterprise 64 Bit
      Eclipse 32 bit with JDK 32 bit

    Description

      waitForOrKill() not working properly
      i have this code:
      public class GroovyTest{

      static void main(def args){
      println"******************** Befehlt:ping www.linux.at mit "(long)5" msec wartezeit*******"
      try{

      def command5 = "ping www.linux.at "
      def proc5 = command5.execute()
      proc5.in.eachLine

      { line -> println line }

      proc5.waitForOrKill((long)5)
      println"Zeit abgelaufen"

      }catch(Exception ee)

      { println "Fehler Zeit abgelaufen" println"stderr: " + ee.message }

      }

      it keeps pinging ang pinging but i want it to stop after 5 sec i also trie 5000 or 1 and even0 but it keeps pinging ..
      how can i set a counter?
      greets

      Attachments

        Activity

          People

            Unassigned Unassigned
            umit umit
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified