Skip to content

Commit 20695d1

Browse files
committed
Made js-console work with windows
Got rid of the condition where the process is considered to be done when stdout or stderr outputs
1 parent cb61d1c commit 20695d1

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

cwltool/sandboxjs.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,6 @@ def get_error(error_queue):
214214
error_thread.daemon=True
215215
error_thread.start()
216216

217-
# mark if output/error is ready
218-
output_ready=False
219-
error_ready=False
220-
221217
while (len(wselect) + len(rselect)) > 0:
222218
try:
223219
if nodejs.stdin in wselect:
@@ -227,29 +223,16 @@ def get_error(error_queue):
227223
wselect = []
228224
if nodejs.stdout in rselect:
229225
if not output_queue.empty():
230-
output_ready = True
231226
stdout_buf.write(output_queue.get())
232-
elif output_ready:
233-
rselect = []
234-
no_more_output.release()
235-
no_more_error.release()
236-
output_thread.join()
237227

238228
if nodejs.stderr in rselect:
239229
if not error_queue.empty():
240-
error_ready = True
241230
stderr_buf.write(error_queue.get())
242-
elif error_ready:
243-
rselect = []
244-
no_more_output.release()
245-
no_more_error.release()
246-
output_thread.join()
247-
error_thread.join()
231+
248232
if stdout_buf.getvalue().endswith("\n".encode()):
249233
rselect = []
250234
no_more_output.release()
251235
no_more_error.release()
252-
output_thread.join()
253236
except OSError as e:
254237
break
255238

0 commit comments

Comments
 (0)