All Implemented Interfaces:
Runnable
Enclosing class:
ShellCommand

private class ShellCommand.CommandThreadextends I2PAppThread
Executes a shell command in its own thread.
  • Field Details

    • shellCommand

      private final Object shellCommand
      The command to run, a String or a String array.
    • envp

      private final String[] envp
      Environment for the command, null to inherit.
    • result

      private final ShellCommand.Result result
      Collects the command's exit code and output.
  • Constructor Details

    • CommandThread

      CommandThread(Object shellCommand, String[] envp, ShellCommand.Result res)
      Runs the shell command in a thread with an explicit environment.
      Parameters:
      shellCommand - either a String or a String[] (since 0.8.3)
      envp - environment entries as NAME=value strings, or null to inherit
      res - holder for the exit status, written when the thread runs
  • Method Details

    • run

      public void run()
      Description copied from class: I2PThread
      Run the thread, catching and reporting OOM and other failures.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class I2PThread