File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ abstract type UnixTerminal <: TextTerminal end
97
97
pipe_reader (t:: UnixTerminal ) = t. in_stream:: IO
98
98
pipe_writer (t:: UnixTerminal ) = t. out_stream:: IO
99
99
100
+ @nospecialize
100
101
mutable struct TerminalBuffer <: UnixTerminal
101
102
out_stream:: IO
102
103
end
@@ -107,6 +108,7 @@ mutable struct TTYTerminal <: UnixTerminal
107
108
out_stream:: IO
108
109
err_stream:: IO
109
110
end
111
+ @specialize
110
112
111
113
const CSI = " \x 1b["
112
114
Original file line number Diff line number Diff line change 96
96
repltask = @task try
97
97
Base. run_std_repl (REPL, false , :yes , true )
98
98
finally
99
- redirect_stderr (isopen (orig_stderr ) ? orig_stderr : devnull )
99
+ redirect_stdin (isopen (orig_stdin ) ? orig_stdin : devnull )
100
100
redirect_stdout (isopen (orig_stdout) ? orig_stdout : devnull )
101
101
close (pts)
102
102
end
@@ -106,14 +106,14 @@ let
106
106
redirect_stdin (pts)
107
107
redirect_stdout (pts)
108
108
redirect_stderr (pts)
109
- REPL. print_qualified_access_warning (Base. Iterators, Base, :minimum ) # trigger the warning while stderr is suppressed
110
109
try
111
- schedule (repltask)
112
- # wait for the definitive prompt before start writing to the TTY
113
- readuntil (output_copy, JULIA_PROMPT)
110
+ REPL. print_qualified_access_warning (Base. Iterators, Base, :minimum ) # trigger the warning while stderr is suppressed
114
111
finally
115
112
redirect_stderr (isopen (orig_stderr) ? orig_stderr : devnull )
116
113
end
114
+ schedule (repltask)
115
+ # wait for the definitive prompt before start writing to the TTY
116
+ readuntil (output_copy, JULIA_PROMPT)
117
117
write (debug_output, " \n #### REPL STARTED ####\n " )
118
118
sleep (0.1 )
119
119
readavailable (output_copy)
148
148
write (ptm, " $CTRL_D " )
149
149
wait (repltask)
150
150
finally
151
- close (pts)
152
151
redirect_stdin (isopen (orig_stdin) ? orig_stdin : devnull )
153
152
redirect_stdout (isopen (orig_stdout) ? orig_stdout : devnull )
153
+ close (pts)
154
154
end
155
155
wait (tee)
156
156
end
You can’t perform that action at this time.
0 commit comments