@@ -156,8 +156,8 @@ runJuliaServer <- function(port = 11980, multiclient = TRUE) {
156
156
portfilename <- tempfile(paste0(" juliaPort" , Sys.getpid()))
157
157
158
158
# workaround for https://github.com/rstudio/rstudio/issues/2446
159
- stdoutfile <- tempfile(' stdout ' ); stderrfile <- tempfile( ' stderr ' )
160
- on.exit(unlink(c( stdoutfile , stderrfile ) ), add = TRUE )
159
+ startupOutputFile <- tempfile(' startupOutput ' );
160
+ on.exit(unlink(startupOutputFile ), add = TRUE )
161
161
162
162
163
163
if (multiclient == TRUE ) {
@@ -178,7 +178,7 @@ runJuliaServer <- function(port = 11980, multiclient = TRUE) {
178
178
args = c(startupOpts , shQuote(mainJuliaFile ), port , shQuote(portfilename ),
179
179
multiclient ),
180
180
wait = FALSE ,
181
- stdout = stdoutfile , stderr = stderrfile ,
181
+ stdout = startupOutputFile , stderr = startupOutputFile ,
182
182
env = getJuliaEnv())
183
183
184
184
# get information about the real port from the temporary file
@@ -188,8 +188,8 @@ runJuliaServer <- function(port = 11980, multiclient = TRUE) {
188
188
Sys.sleep(sleepTime )
189
189
timeSlept <- timeSlept + sleepTime
190
190
if (timeSlept > = 50 ) {
191
- try({cat(paste(readLines(stderrfile ), collapse = " \n " ),
192
- file = stderr ())})
191
+ try({cat(paste(readLines(startupOutputFile ), collapse = " \n " ),
192
+ file = stdout ())})
193
193
stop(" Timeout while waiting for response from Julia server" )
194
194
}
195
195
}
0 commit comments