joehl@web.de
2000-Dec-20 12:42 UTC
[Rd] showConnections() does not show closed (or non-opened) connections though help says so (PR#784)
help on showConnections explains parameter all logical: if true all connections, including closed ones and the standard ones are displayed. If false only open user-created connections are included. but> # create a file > cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file="ex.data",+ sep="\n")> showConnections(all=TRUE)class description mode text isopen can read can write 0 "stdin" "terminal" "r" "text" "opened" "yes" "no" 1 "stdout" "terminal" "w" "text" "opened" "no" "yes" 2 "stderr" "terminal" "w" "text" "opened" "no" "yes"> > con <- file("ex.data") > showConnections(all=TRUE)class description mode text isopen can read can write 0 "stdin" "terminal" "r" "text" "opened" "yes" "no" 1 "stdout" "terminal" "w" "text" "opened" "no" "yes" 2 "stderr" "terminal" "w" "text" "opened" "no" "yes"> # here the connection (existing? but not-opened) is not listend > > open(con) > showConnections(all=TRUE)class description mode text isopen can read can write 0 "stdin" "terminal" "r" "text" "opened" "yes" "no" 1 "stdout" "terminal" "w" "text" "opened" "no" "yes" 2 "stderr" "terminal" "w" "text" "opened" "no" "yes" 3 "ex.data" "file" "r" "text" "opened" "yes" "no"> > close(con) > showConnections(all=TRUE)class description mode text isopen can read can write 0 "stdin" "terminal" "r" "text" "opened" "yes" "no" 1 "stdout" "terminal" "w" "text" "opened" "no" "yes" 2 "stderr" "terminal" "w" "text" "opened" "no" "yes"> > readLines("ex.data", n=-1)[1] "TITLE extra line" "2 3 5 7" "" "11 13 17"> showConnections(all=TRUE)class description mode text isopen can read can write 0 "stdin" "terminal" "r" "text" "opened" "yes" "no" 1 "stdout" "terminal" "w" "text" "opened" "no" "yes" 2 "stderr" "terminal" "w" "text" "opened" "no" "yes"> # here we don't know whether showConnections() does not show a connection created and opened by readLine() > # or whether readLines() did also close the connectionRegards 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- showConnections() does not show closed (or non-opened) connections though help says so
- unlink() is not synchronized with existing connections
- unlink() is not synchronized with existing connections (PR#783)
- file descriptor leak in getSrcLines in R 2.10.0 svn 48590
- cannot destroy connection (?) created by readLines in a tryCatch