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
unlink("/tmp/fifo")
system("mkfifo /tmp/fifo")
script<- quote({
conn<-processx::conn_create_file("/tmp/fifo")
repeat {
out<-processx::conn_read_chars(conn)
if (nchar(out) ==0) break
cat(out)
}
})
cat(deparse(script), file="/tmp/script.R", sep="\n")
id<-rstudioapi::jobRunScript("/tmp/script.R")
idpp<-processx::process$new(
"bash",
c("-c", "for i in `seq 1 100`; do sleep 1; echo $i; done"),
stdout="/tmp/fifo"
)
# Now you can even do these and morepp$suspend()
pp$resume()
# rstudioapi::launcherControlJob(id, "kill")rstudioapi::jobRemove(id)
API can be stdout = "|rstudio" or we can even have a new function that does this, and inherit from process and add methods to manage the rstudio job. But then it will no work for the other subclasses, like r_process.
The text was updated successfully, but these errors were encountered:
poc on Unix:
API can be
stdout = "|rstudio"
or we can even have a new function that does this, and inherit fromprocess
and add methods to manage the rstudio job. But then it will no work for the other subclasses, liker_process
.The text was updated successfully, but these errors were encountered: