Re: [Rd] library(tcltk) v. SIGPIPE BUG (?!?)

2012-12-12 Thread Martin Maechler
 CM == Cook, Malcolm m...@stowers.org
 on Tue, 11 Dec 2012 16:50:58 -0600 writes:

CM Excellent, thanks for the workaround, that gets _me_ by, for now.
CM ~Malcolm


 -Original Message-
 From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
 Sent: Tuesday, December 11, 2012 2:40 PM
 To: Cook, Malcolm
 Cc: r-discuss...@listserv.stowers.org; r-devel@r-project.org; 
phgrosj...@sciviews.org; Blanchette, Marco
 Subject: Re: library(tcltk) v. SIGPIPE BUG (?!?)
 
 On Tue, Dec 11, 2012 at 3:14 PM, Cook, Malcolm m...@stowers.org wrote:
  Hi R-devel, tcltk devel, and sqldf devel,
 
  The transcript below shows how loading the tcl/tk library in under R 
causes subprocesses to ignore SIGPIPE.
 
  I am including the developer of the (wonderful) sqldf package since it 
requires tcltk and you might like to make this dependence
 optional to the user (at least until this is fixed in tcltk).
 
  Am I mistaken in calling this a 'bug'?

well, at least an unfortunate feature ;-)

  Any insights appreciated!

Could it be that the problem in the severity you've reported it,
is  Mac specific ?

For me, on Linux (R 2.15.2 patched):

 system(intern=TRUE,'yes | head ')
 [1] y y y y y y y y y y

 require(tcltk)
Loading required package: tcltk
Loading Tcl/Tk interface ... done
 system(intern=TRUE,'yes | head ')
yes: standard output: Broken pipe
yes: write error
 [1] y y y y y y y y y y
 system(intern=TRUE,'yes | head ')
yes: standard output: Broken pipe
yes: write error
 [1] y y y y y y y y y y
 system(intern=TRUE,'yes | head -6 ')
yes: standard output: Broken pipe
yes: write error
[1] y y y y y y

So things continue to  ``work'' there, 
although with the extra warning messages.


 
  Thanks,
 
  Malcolm Cook
  Computational Biology - Stowers Institute for Medical Research
 
 
  system(intern=TRUE,'yes | head ')
   [1] y y y y y y y y y y
  library(tcltk)
  Loading Tcl/Tk interface ... done
  system(intern=TRUE,'yes | head ')
 
  ### this now does not return to the prompt and Looking at 'top' shows 
that 'yes' is running until I hit ctrl-c, after which it returns.
  C-c C-c
[1] y y y y y y y y y y
 
 
  sessionInfo()
  R version 2.15.1 (2012-06-22)
  Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
 
  locale:
  [1] C
 
  attached base packages:
  [1] tcltk stats graphics  grDevices utils datasets  
methods   base
 
 
 
 
 As a workaround specify the R engine instead of the tcl engine in
 wihch case gsubfn (which is called by sqldf) won't try to use the
 tcltk package:
 
 options(gsubfn.engine = R)
 library(sqldf)
 
 
 
 --
 Statistics  Software Consulting
 GKX Group, GKX Associates Inc.
 tel: 1-877-GKX-GROUP
 email: ggrothendieck at gmail.com

CM __
CM R-devel@r-project.org mailing list
CM https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] library(tcltk) v. SIGPIPE BUG (?!?)

2012-12-11 Thread Cook, Malcolm
Hi R-devel, tcltk devel, and sqldf devel,

The transcript below shows how loading the tcl/tk library in under R causes 
subprocesses to ignore SIGPIPE.

I am including the developer of the (wonderful) sqldf package since it requires 
tcltk and you might like to make this dependence optional to the user (at least 
until this is fixed in tcltk).

Am I mistaken in calling this a 'bug'?

Any insights appreciated!

Thanks,

Malcolm Cook
Computational Biology - Stowers Institute for Medical Research


 system(intern=TRUE,'yes | head ')
 [1] y y y y y y y y y y
 library(tcltk)
Loading Tcl/Tk interface ... done
 system(intern=TRUE,'yes | head ')

### this now does not return to the prompt and Looking at 'top' shows that 
'yes' is running until I hit ctrl-c, after which it returns.
C-c C-c
  [1] y y y y y y y y y y


 sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
[1] tcltk stats graphics  grDevices utils datasets  methods   base  
   


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] library(tcltk) v. SIGPIPE BUG (?!?)

2012-12-11 Thread Gabor Grothendieck
On Tue, Dec 11, 2012 at 3:14 PM, Cook, Malcolm m...@stowers.org wrote:
 Hi R-devel, tcltk devel, and sqldf devel,

 The transcript below shows how loading the tcl/tk library in under R causes 
 subprocesses to ignore SIGPIPE.

 I am including the developer of the (wonderful) sqldf package since it 
 requires tcltk and you might like to make this dependence optional to the 
 user (at least until this is fixed in tcltk).

 Am I mistaken in calling this a 'bug'?

 Any insights appreciated!

 Thanks,

 Malcolm Cook
 Computational Biology - Stowers Institute for Medical Research


 system(intern=TRUE,'yes | head ')
  [1] y y y y y y y y y y
 library(tcltk)
 Loading Tcl/Tk interface ... done
 system(intern=TRUE,'yes | head ')

 ### this now does not return to the prompt and Looking at 'top' shows that 
 'yes' is running until I hit ctrl-c, after which it returns.
 C-c C-c
   [1] y y y y y y y y y y


 sessionInfo()
 R version 2.15.1 (2012-06-22)
 Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

 locale:
 [1] C

 attached base packages:
 [1] tcltk stats graphics  grDevices utils datasets  methods   base




As a workaround specify the R engine instead of the tcl engine in
wihch case gsubfn (which is called by sqldf) won't try to use the
tcltk package:

options(gsubfn.engine = R)
library(sqldf)



--
Statistics  Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] library(tcltk) v. SIGPIPE BUG (?!?)

2012-12-11 Thread Cook, Malcolm
Excellent, thanks for the workaround, that gets _me_ by, for now.

~Malcolm


 -Original Message-
 From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
 Sent: Tuesday, December 11, 2012 2:40 PM
 To: Cook, Malcolm
 Cc: r-discuss...@listserv.stowers.org; r-devel@r-project.org; 
 phgrosj...@sciviews.org; Blanchette, Marco
 Subject: Re: library(tcltk) v. SIGPIPE BUG (?!?)
 
 On Tue, Dec 11, 2012 at 3:14 PM, Cook, Malcolm m...@stowers.org wrote:
  Hi R-devel, tcltk devel, and sqldf devel,
 
  The transcript below shows how loading the tcl/tk library in under R causes 
  subprocesses to ignore SIGPIPE.
 
  I am including the developer of the (wonderful) sqldf package since it 
  requires tcltk and you might like to make this dependence
 optional to the user (at least until this is fixed in tcltk).
 
  Am I mistaken in calling this a 'bug'?
 
  Any insights appreciated!
 
  Thanks,
 
  Malcolm Cook
  Computational Biology - Stowers Institute for Medical Research
 
 
  system(intern=TRUE,'yes | head ')
   [1] y y y y y y y y y y
  library(tcltk)
  Loading Tcl/Tk interface ... done
  system(intern=TRUE,'yes | head ')
 
  ### this now does not return to the prompt and Looking at 'top' shows that 
  'yes' is running until I hit ctrl-c, after which it returns.
  C-c C-c
[1] y y y y y y y y y y
 
 
  sessionInfo()
  R version 2.15.1 (2012-06-22)
  Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
 
  locale:
  [1] C
 
  attached base packages:
  [1] tcltk stats graphics  grDevices utils datasets  methods   
  base
 
 
 
 
 As a workaround specify the R engine instead of the tcl engine in
 wihch case gsubfn (which is called by sqldf) won't try to use the
 tcltk package:
 
 options(gsubfn.engine = R)
 library(sqldf)
 
 
 
 --
 Statistics  Software Consulting
 GKX Group, GKX Associates Inc.
 tel: 1-877-GKX-GROUP
 email: ggrothendieck at gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] library(tcltk) v. SIGPIPE BUG (?!?)

2012-12-11 Thread peter dalgaard

On Dec 11, 2012, at 23:50 , Cook, Malcolm wrote:

 Excellent, thanks for the workaround, that gets _me_ by, for now.

The real issue is probably yet another symptom of something that can be 
described as insufficient separation between the R engine and its GUI 
components. Or: One process trying to serve two masters. It is not fixable 
overnight, but some of us (me, at least) try to find time to get a handle on 
it. My take is that it is necessary to set things up as separate threads or 
processes and define the interface via some sort of message-passing protocol.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel