[Rd] unlink() is not synchronized with existing connections

Jens Oehlschlägel joehl@web.de
Wed, 20 Dec 2000 13:36:17 +0100


> # creating a file
> cat("sddfasdf", file="tempfile")
> showConnections()
     class description mode text isopen can read can write
> con <- file("tempfile", "r")
> readLines(con)
[1] "sddfasdf"
Warning message: 
incomplete final line in: readLines(con, n, ok) 
> showConnections()
  class      description mode text   isopen   can read can write
3 "tempfile" "file"      "r"  "text" "opened" "yes"    "no"     
> unlink("tempfile")
> showConnections()
  class      description mode text   isopen   can read can write
3 "tempfile" "file"      "r"  "text" "opened" "yes"    "no"     
> # now we have an opened (read) connection to a non-existing file left

BTW: this may be considered as a special case of a more general thing: 
undefined rights to modify/access connections owned by other parts of the software


Regards


Jens Oehlschlägel


--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = x86
 os = Win32
 system = x86, Win32
 status = 
 major = 1
 minor = 2.0
 year = 2000
 month = 12
 day = 15
 language = R

Windows NT 4.0 (build 1381) Service Pack 6

Search Path:
 .GlobalEnv, package:ctest, Autoloads, package:base

______________________________________________________________________________
Die Fachpresse ist sich einig: WEB.DE 15mal Testsieger! Kostenlos E-Mail, 
Fax, SMS, Verschlüsselung, POP3, WAP....testen Sie uns! http://freemail.web.de

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._