!7

p-type {
  File outputFile = incrementFileName(prepareCacheProgramFile("jhat.out"));
  makeEmptyFile(outputFile);
  TailFile tail = tailFile(outputFile, 1000, voidfunc(S s) {
    printNoNewLine(fixNewLines(s));
  });
  // child process should exit when we exit
  backtickToFile("jhat " + smartJoin(args), outputFile);
  tail.stop();
}