[Rd] Possible bug: R --slave --interactive stdin echo on Linux when stdin is a fifo

Gábor Csárdi c@@rdi@g@bor @ending from gm@il@com
Thu Jul 26 01:22:27 CEST 2018


I am trying to control a background R session, connected via a fifo /
named pipe.

The problem is, R --slave --interactive does not echo the input on
stdout on macOS and Windows, but it does echo it on Linux. This is
very unfortunate, because there is no easy way to separate the input
and the stdout of the R process here.

Here is how to reproduce it easily:

mkfifo fif
R --slave --interactive < fif > out &
(echo 1+1; echo '"foobar"') > fif
cat out

#> 1+1
#> [1] 2
#> "foobar"
#> [1] "foobar"

This is recent  R-devel, but at least 3.4.x has this behavior as well.

Would it be possible to eliminate the echo on Linux as well?

Thanks,
Gabor



More information about the R-devel mailing list