From c@@rdi@g@bor @ending from gm@il@com  Thu Jul 26 01:22:27 2018
From: c@@rdi@g@bor @ending from gm@il@com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Thu, 26 Jul 2018 00:22:27 +0100
Subject: [Rd] Possible bug: R --slave --interactive stdin echo on Linux when
 stdin is a fifo
Message-ID: <CABtg=KnwNEtKbNB3X1KKhLBLJP2W3_g7vc-RLwJ9=yiwfq0E8A@mail.gmail.com>

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



[Rd] Possible bug: R --slave --interactive stdin echo on Linux when stdin is a fifo
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=