Closed master-nevi closed 8 years ago
Hi, judging by the screenshot it seems like you're using version 1. I get the same error in the latest version (2):
run("cat","longtext.txt")
This function does indeed call task.waitUntilExit()
. This however does not and works fine:
runAsync("cat","longtext.txt").stdout.read()
Postponing task.waitUntilExit()
until after reading all of the output fixed the problem. I still want to wait until the task has finished just in case it does some work after closing its standard output.
@master-nevi and thanks for reporting this. Please let me know if this fixes the problem for you.
Basically NSTask.waitUntilExit() never returns for some reason. Easy to reproduce by calling
cat <some_large_text_file>.txt