code: private ProcessAttributes getAttributes() {
      return new ProcessAttributes(
            getCommand(),
            getDirectory(),
            new LinkedHashMap<String, String>(environment),
            allowedExitValues == null ? null : new HashSet<Integer>(allowedExitValues));
    }
docs: Capture a snapshot of this process executor's main state.