[R-sig-Geo] BUG? readRAST6() closes sink("all.Rout")

Roger Bivand Roger.Bivand at nhh.no
Wed Apr 24 09:09:03 CEST 2013

On Tue, 23 Apr 2013, Rainer M. Krug wrote:

> Hi
> I have something strange happening and I do not know if it is a bug.
> When I open a sink() and execute readRAST() the sink is closed
> afterwards.
> This is caused by the call to closeAllConnections() in readRAST6(). I
> realise, that this can be avoided by using close_OK=FALSE, but would
> there be a less radical way of closing these connections?

Replaced by counting open connections on entry, and only closing 
connections added to the connection table while running the function, in 
revision 1384. This is not thread-safe (it doesn't cater for something 
else opening connections in R but not in readRAST6), but this should at 
least be less radical than closing them all. The reason for closing is 
that multiple links are opened to GRASS modules, wher the number open 
isn't easy to control.


> Cheers,
> Rainer

Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list