Uploaded image for project: 'Commons Exec'
  1. Commons Exec
  2. EXEC-68

Watchdog kills process immediately if timeout is too large

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1, 1.2
    • 1.2
    • None
    • Should exist for all platforms, but specifically identified on Windows 7.

    Description

      When using the ExecuteWatchdog with a very large timeout (e.g., Long.MAX_VALUE), the Watchdog immediately destroys the process instead of waiting for the duration of the timeout. For example, the following code snippet would continue immediately:

      DefaultExecutor executor = new DefaultExecutor();
      ExecuteWatchdog watchdog = new ExecuteWatchdog(Long.MAX_VALUE);
      executor.setWatchdog(watchdog);
      
      executor.execute(cmd); // Where `cmd` could be any valid command.
      

      Attachments

        1. EXEC-68.patch
          3 kB
          Joel McCance

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmccance Joel McCance
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: