Skip to content
Back to formatted view

Raw Message

Message-ID: <475EA1FB.8010002@Update.UU.SE>
Date: 2007-12-11T14:43:07Z
From: Bjarni Juliusson
Subject: Interactiveness

Hi list!

I'm developing R integration for a project called Bioclipse at Uppsala 
University. The current implementation works by simply forking an R and 
sending it text (with some substitutions on it) down a pipe, getting the 
printed output back up another pipe. This of course works fine, except 
it runs into one problem: R finds a pipe on its stdin and decides to be 
"non-interactive", which means that as soon as the user makes a typo and 
causes an error, R exits.

I checked the source, and it's a couple of isatty()'s in the two files 
named system.c that are doing it. They are of course intended to be a 
feature, but in this case it causes us trouble. Would it be possible to 
get a command line switch to control this behaviour? I'm not sure pseudo 
terminals can be used portably, or can they? Are those few lines with 
the isatty's, which set R_Interactive to FALSE, the only places that 
need to be patched (besides adding the switch somewhere)? Should I send 
in a complete patch or is a request for functionality sufficient?

Lots of questions there, grateful for any answers! :-)


Bjarni
-- 

                        INFORMATION WANTS TO BE FREE