public static void terminateProcessGracefully(@NotNull Process process) throws RuntimeException {
    terminateProcessGracefully((int)process.pid(), process.getOutputStream());
  }
public static void terminateProcessGracefully(@NotNull Process process)