// returns file with program output (STDOUT+STDERR) static File backtickToConsoleX(S cmd, fO outputReceiver) { File outputFile = createTempFile(cmd, ".out"); makeEmptyFile(outputFile); // unnecessary? TailFile tail = tailFile2(outputFile, 1000, voidfunc(S s) { printNoNewLine(fixNewLines(s)); pcallF(outputReceiver, s); }); // make a dependent child process that is exited when we exit print("Running: " + cmd); pcall { backtickToFile(cmd, outputFile); } tail.stop(); ret outputFile; }