code: public int exec(String cmd, Map<String, String> env) throws IOException, InterruptedException {
          return exec(cmd, env, System.out, System.err, null);
      }
docs: Executes the a command specified in parameter.
  
  @param cmd a specified system command
  @param env the environment variables map to use or null to inherit process environment
  @return the cancel value of the process. By convention, 0 indicates normal termination