[Rd] pipe(): input to, and output from, a single process
Gábor Csárdi
c@@rd|@g@bor @end|ng |rom gm@||@com
Mon Mar 16 20:17:04 CET 2020
Well, if you want blocking, you can poll with an infinite timeout.
This returns if
1) there is output,
2) the process terminates, or
3) you interrupt with CTRL+C / ESC /etc.
and then right after the polling, you can read the output. This still
works if the process has finished already.
Gabor
On Mon, Mar 16, 2020 at 7:06 PM Greg Minshall <minshall using umich.edu> wrote:
>
> Gabor, thanks. yes, managing the two-way communication is always a bit
> error-prone, as it depends on the input/output characteristics of the
> two ends -- they either match, or deadlock. it's too bad if polling is
> always *required* -- i'd think sometimes a programmer would be happy
> blocking, though other times one wants better control over when to
> block. cheers, Greg
More information about the R-devel
mailing list