Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.ruby Subject: Re: IO.popen hanging Date: Wed, 12 Jun 2013 08:08:44 +0200 Lines: 35 Message-ID: References: <51b72d29$0$2103$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: individual.net jtXCXAFgSooaGAHots1ilg/o5ePA7WoktdACcflL5+dfIWxBk= Cancel-Lock: sha1:YGMjzFfDvbGcq635VfoePly1fwQ= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 In-Reply-To: <51b72d29$0$2103$426a74cc@news.free.fr> Xref: csiph.com comp.lang.ruby:6832 On 06/11/2013 03:59 PM, Une B=E9vue wrote: > if i do, on terminal : > > echo -n "something" | /usr/bin/xclip -selection c > > the time to exec is instantaneous. > > however using either : > > `echo -n "#{@prefix}" | /usr/bin/xclip -selection c ` > > or : > > IO.popen(["/usr/bin/xclip","-selection","c"], "w+") do |io| > io.write @prefix > io.close_write > IO.copy_stream(io, $stdout) > end > > > @prefix being : > @prefix=3DTime.new.strftime("%y-%m-%d--%H-%M-%S--") > > it takes several minutes... > > why ? I have no idea. You could try to use strace to show what xclip is doing = all the time. Kind regards robert