Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6832

Re: IO.popen hanging

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.ruby
Subject Re: IO.popen hanging
Date 2013-06-12 08:08 +0200
Message-ID <b1qhjcFhgrpU1@mid.individual.net> (permalink)
References <51b72d29$0$2103$426a74cc@news.free.fr>

Show all headers | View raw


On 06/11/2013 03:59 PM, Une Bévue 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=Time.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

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

IO.popen hanging Une Bévue <unbewusstsein@fai.invalid> - 2013-06-11 15:59 +0200
  Re: IO.popen hanging Robert Klemme <shortcutter@googlemail.com> - 2013-06-12 08:08 +0200
    Re: IO.popen hanging Une Bévue <unbewusst.sein@fai.invalid> - 2013-06-12 09:45 +0200
      Re: IO.popen hanging Robert Klemme <shortcutter@googlemail.com> - 2013-06-17 18:42 +0200

csiph-web