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

Rainer M. Krug Rainer at krugs.de
Wed Apr 24 11:18:46 CEST 2013


Roger Bivand <Roger.Bivand at nhh.no> writes:

> 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. 

Thanks - so I can use sink() without getting it closed by
readRAST(...close_OK=TRUE).

> 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.

OK. Thanks for the clarification and the solution,

Thanks a lot,

Rainer

>
> Roger
>
>>
>> Cheers,
>>
>> Rainer
>>
>>
>>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130424/3dc8e799/attachment.bin>


More information about the R-sig-Geo mailing list