Christophe
Weblog
Wiki
Code
Publications
Music
projects
/
swankr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5035036
)
ensure that the fifo is closed in printToString()
author
Christophe Rhodes
<csr21@cantab.net>
Wed, 25 Aug 2010 14:55:41 +0000
(15:55 +0100)
committer
Christophe Rhodes
<csr21@cantab.net>
Wed, 25 Aug 2010 14:55:41 +0000
(15:55 +0100)
Whoops. Good to know that I can make the same basic stream mistakes
in any language.
swank.R
patch
|
blob
|
history
diff --git
a/swank.R
b/swank.R
index 1c1633d77ad8c7aa7fa8a709eb3a3bcd02e57e10..05b1c784f6aca534b4361349ba05adb9cc732529 100644
(file)
--- a/
swank.R
+++ b/
swank.R
@@
-230,10
+230,8
@@
writeSexpToString <- function(obj) {
printToString <- function(val) {
f <- fifo("")
- sink(f)
- print(val)
- sink()
- readLines(f)
+ tryCatch({ sink(f); print(val); sink(); readLines(f) },
+ finally=close(f))
}
`swank:connection-info` <- function (io, sldbState) {