[Rd] Could Rstd_Busy do something (src/unix/sys-std.c)?

From: Jakson Alves de Aquino <jalvesaq_at_gmail.com>
Date: Sat, 15 Dec 2012 08:36:13 -0300


Currently the function Rstd_Busy() does nothing (src/unix/sys-std.c):

    void attribute_hidden Rstd_Busy(int which)     {
}

The function is called through a pointer and R interfaces can change this pointer and, thus, use a different function. I don't plan to create a whole new interface to R, but I maintain a package whose aim is to provide a new feature to R when it's running in a terminal emulator on Unix systems:

    http://cran.r-project.org/web/packages/setwidth/index.html

The package setwidth updates the value of options("width") whenever R receives SIGWINCH signal. The package does not set the value of any interface pointer, but it may make R crash if the terminal emulator is resized while R is busy. I could avoid the crash if I knew that R is busy at the moment that it receives the SIGWINCH. Thus my question is: Could Rstd_Busy() set the value of a variable so packages like setwidth could know that R is busy? The function could be changed to something like:

    void attribute_hidden Rstd_Busy(int which)     {

        R_is_busy = which;
}

And the R_is_busy variable could be accessed either directly or through a "get" function, like:

    int get_busy_state(){

        return R_is_busy;
}

Thanks!

-- 
Jakson Alves de Aquino
Federal University of CearĂ¡
Social Sciences Department
www.lepem.ufc.br/aquino.php

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat 15 Dec 2012 - 11:44:55 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 15 Dec 2012 - 17:13:01 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive