Displaying 20 results from an estimated 10000 matches similar to: "Location of source code for readline()"
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
Hi.
WISHLIST:
Regardless on console, I'd like to be able to timeout a call to
readline()/file("stdin", blocking=TRUE) via setTimeLimit.
OBSERVATION:
On Windows Rterm as well as plain R on Linux, setTimeLimit() does not
momentarily interrupt from stdin, but only after hitting RETURN. A
few examples:
timeout00 <- function() {
setTimeLimit(elapsed=5);
Sys.sleep(10);
}
1998 Mar 09
1
bug in menu, readline
Neither do_menu nor do_readln (in src/main/scan.c) call the function
InitConsoleGetchar. They need to do this to reset ConsolePrompt. If you
use "scan" to read in data from the terminal, then ConsolePrompt is set
to "n:" for some integer n and this prompt makes an unwelcome appearance
when you use the "menu" or "readline" functions.
Incidentally, could we
1999 Mar 25
4
readline() (PR#147)
Dear R developers,
I have found the following bug with readline() in R 0.63.3:
if you execute the menu-function and then the readline() function, then
readline() prompts "Selection:"
> a <- readline()
hello
> a
[1] "hallo"
> a <- menu(c("a", "b"), title="bitte:")
bitte:
1:a
2:b
Selection: 2
> a <- readline()
Selection:
2011 Dec 16
2
Event handling in R
Dear R-helpers,
I've just started playing with getGraphicsEvent() in R, and was wondering if there is a simple way to stop this function waiting for input after a pre-defined time, instead of relying either on a non-NULL value from one of the event handlers or for a user-interrupt for it to halt (as per the R manual).
The only way that I've thought of to make this work is using
2016 Oct 31
1
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On Mon, 31 Oct 2016, Henrik Bengtsson wrote:
> Thank you for looking into this Luke.
>
> On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote:
>> On unix, unless event polling is enabled Sys.sleep just waits in a
>> select() call (with a SIGINT handler in place) so the elapsed time
>> isn't checked until after the select call is complete.
2019 May 22
1
make running on.exit expr uninterruptible
Hi,
Is there currently any way to guarantee that on.exit does not fail to execute the recorded expression because of a user interrupt arriving during function exit? Consider:
f <- function() {
suspendInterrupts({
on.exit(suspendInterrupts(cntr_on.exit <<- cntr_on.exit + 1L))
cntr_f <<- cntr_f + 1L
})
TRUE
}
It is possible to interrupt this function such that cntr_f
2016 Oct 26
5
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
setTimeLimit(elapsed=1) causes a timeout error whenever a call takes
more than one second. For instance, this is how it works on Windows
(R 3.3.1):
> setTimeLimit(elapsed=1)
> Sys.sleep(10); message("done")
Error in Sys.sleep(10) : reached elapsed time limit
Also, the error propagates immediately and causes an interrupt after ~1 second;
> system.time({ Sys.sleep(10);
2016 Oct 27
2
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On unix, unless event polling is enabled Sys.sleep just waits in a
select() call (with a SIGINT handler in place) so the elapsed time
isn't checked until after the select call is complete. Rstudio uses
event polling, and in particular sets R_wait_usec to 10000, which
means event and interrupt checks happen during a Sys.seep call. The R
GUI on macOS doesn't seem to do this (but my lldb
2005 Aug 29
2
test for readline installation fails if installation location non-standard (PR#8104)
Full_Name: D Kreil
Version: 2.1.1
OS: HP-UX B.11.23 U ia64 0029870451 unlimited-user license
Submission from: (NULL) (62.178.15.60)
When the dependency readline is installed in a non-standard location the
installation procedure fails.
If using a non-standard installation location like
--prefix=/bi/common --exec-prefix=/bi/arch
the configure script default include and library paths should
2013 May 16
1
setTimeLimit sometimes fails to terminate idle call in R
I would like to use setTimeLimit to abort operations that are stuck
waiting (idle) after n seconds. Below a toy example in which Sys.sleep
is a placeholder call that is idle:
testlimit <- function(){
setTimeLimit(elapsed=3, transient=TRUE);
Sys.sleep(10);
}
system.time(testlimit());
However this is giving inconsistent results. On windows and in
r-studio server (linux) the call is
2007 Jan 29
1
Problem with "readline" in compilatio of R for Solaris 11 (Nevada) in x86
Dear friends,
In configuring R 2.4.1 for Solaris 11, using SunStudio 11 compilers, I
get the following error.
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking for rl_callback_read_char
2016 Oct 26
3
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for the feedback and confirmations. Interesting to see that
it's also reproducible on macOS expect for Spencer; that might
indicate a difference in builds.
BTW, my original post suggested that timeout error was for sure
detected while running Sys.sleep(10). However, it could of course
also be that it is only detected after it finishes.
For troubleshooting, the
2006 Feb 02
3
readline detection problems
Dear community,
I'm trying to install R-2.2.1 on an IRIX 6.2 (Unix System V Release 4)
system without root access. Unfortunately readline is not installed in
default, so I installed it locally in my home directory, more precisely in:
$HOME/vol/readline-5.1, where $HOME is "/home3/fa/faga001". Afterwards I
appended the path to the library with several $PATH variable, which now
looks
2006 Feb 02
3
readline detection problems
Dear community,
I'm trying to install R-2.2.1 on an IRIX 6.2 (Unix System V Release 4)
system without root access. Unfortunately readline is not installed in
default, so I installed it locally in my home directory, more precisely in:
$HOME/vol/readline-5.1, where $HOME is "/home3/fa/faga001". Afterwards I
appended the path to the library with several $PATH variable, which now
looks
2002 Mar 24
2
readline?
We've recently "upgraded" a server to solaris 8, and in reinstalling R
I've encountered a problem in getting it to recognize the readline library.
I have installed readline in what I believe to be the "usual" place:
/usr/local/lib with include files in /usr/local/include/readline.
But ./configure produces:
ragnar.econ.uiuc.edu# grep readline hout
checking for
2004 Jun 14
4
Readline on R-1.9.1a
Hello! I'm trying to install R-1.9.1a with readline on Suse Linux. As
recommended in other posts, I've installed readline and readline-devel:
kevin@redtail:~/R-1.9.1> rpm -qa | grep readline
readline-devel-32bit-9.0-0
readline-32bit-9.0-0
readline-4.3-207
readline-devel-4.3-207
Then I run configure with readline:
./configure --with-readline
The relevant lines are:
2006 Jul 09
1
Tiger OS X darwin ports problem with readline
Hi,
I just edited this page:
http://wiki.rubyonrails.org/rails/pages/DarwinPorts
I thought I''d post something to this mail-list in hopes of an answer..
I''m running Tiger.
On my Mac, I cannot get past installation of readline:
mac:~ mac$ sudo port install readline
Password:
---> Fetching readline
---> Attempting to fetch readline51-001 from
2003 Nov 18
2
readline not found
Hi all,
I just upgraded to R-1.8.0. Everything worked fine but command line
editing does not work. This clearly indicates that readline has not been
found in the compilation process.
How could I explicitely indicate where to find it ?
I use a Red Hat 8.0 system. I checked the FAQ which says readline-devel
is also needed, but I have it already installed. Perhaps should I add
the configure
2006 Jan 08
4
repeat { readline() }
Hi.
Using Rterm v2.2.1 on WinXP, is there a way to interrupt a call like
repeat { readline() }
without killing the Command window? Ctrl+C is not interrupting the loop:
R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.2.1 Patched (2006-01-01 r36947)
<snip></snip>
> repeat { readline() }
^C
^C
^C
^C
On Unix it works. The problem seems to get the
2011 Dec 30
1
configure can't find readline -- but it's there!
Am trying to install 2.14.0 on a CentOS system. The configure script
apparently can't find something to do with the readline library:
Configure: error: --with-readline=yes (default) and headers/libs are not
available
Yes, I know I need readline 4.2 or later. "yum" assures me that rev 5.1
is already installed.
And I know I need to provide configuration flags if it is in