From MEC at stowers.org  Tue Dec 11 23:50:58 2012
From: MEC at stowers.org (Cook, Malcolm)
Date: Tue, 11 Dec 2012 16:50:58 -0600
Subject: [Rd] library(tcltk) v. SIGPIPE BUG (?!?)
In-Reply-To: <CAP01uRn4fwmxpMwNEJ+E9AgkyQjBVPZxhx-=2BVH-+_BgYfYXA@mail.gmail.com>
References: <2C40E43D1F7A56408C4463FD245DDDF90790E16BC1@EXCHMB-02.stowers-institute.org>
	<CAP01uRn4fwmxpMwNEJ+E9AgkyQjBVPZxhx-=2BVH-+_BgYfYXA@mail.gmail.com>
Message-ID: <2C40E43D1F7A56408C4463FD245DDDF90790E16BFE@EXCHMB-02.stowers-institute.org>

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

~Malcolm


> -----Original Message-----
> From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com]
> Sent: Tuesday, December 11, 2012 2:40 PM
> To: Cook, Malcolm
> Cc: r-discussion at listserv.stowers.org; r-devel at r-project.org; phgrosjean at sciviews.org; Blanchette, Marco
> Subject: Re: library(tcltk) v. SIGPIPE BUG (?!?)
> 
> On Tue, Dec 11, 2012 at 3:14 PM, Cook, Malcolm <MEC at 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



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