You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoking System.Process.run with a command that prints a lot to the stdout, it freezes. After some investigation, I have found out that this is not Enso-specific, but this can be reproduced by a simple Java program:
With generate_output.py (just prints lines of length 1024 of random characters):
importsysimportrandomimportstringLINE_LEN=1024if__name__=="__main__":
iflen(sys.argv) !=2:
print("Usage: python generate_output.py <len>")
sys.exit(1)
num_lines=int(sys.argv[1])
# print num_out random characters to the stdoutforiinrange(num_lines):
print(''.join(random.choices(string.ascii_uppercase+string.digits, k=LINE_LEN)))
In Java, this process hangs forever. This is because of the pipe redirection. If we change the redirect to a file, then the subprocess exits almost immediately.
When invoking
System.Process.run
with a command that prints a lot to the stdout, it freezes. After some investigation, I have found out that this is not Enso-specific, but this can be reproduced by a simple Java program:With
generate_output.py
(just prints lines of length 1024 of random characters):In Java, this process hangs forever. This is because of the pipe redirection. If we change the
redirect
to a file, then the subprocess exits almost immediately.Partially explained in:
I have encountered this issue when I was trying to create a subprocess that runs the following command:
And noticed that when I remove the
-v
flag, it does not freeze.The text was updated successfully, but these errors were encountered: