Git Product home page Git Product logo

Comments (3)

tjheeta avatar tjheeta commented on August 25, 2024

I had the same problem with large messages, so I ran in a separate console:
while [ 1 ] ; do killall html2text ; sleep 30 ; done

Not a ruby guy, but I don't see a way to get the subprocess id of html2text with popen3. I'm not sure if we need stderr, so maybe conversion to IO.popen would be fine?

from heliotrope.

wmorgan avatar wmorgan commented on August 25, 2024

I have a solution to this that works on Ruby 1.8 with the system_timeout gem, but that gem doesn't compile (and is supposedly unnecessary) on Ruby 1.9. The stdlib 'timeout' gem is supposed to work fine on 1.9, and works for the simple case of Timeout::timeout(5) { system "sleep 10" }, but doesn't work when I call popen3 and read from stdin. This might be a bug in popen3 in Ruby 1.9.

At any rate, you can get the pid via a fourth argument to the block in open3 (see http://ruby-doc.org/stdlib/libdoc/open3/rdoc/classes/Open3.html#M001644), so killing the process might be a solution. I'll continue to play around.

from heliotrope.

wmorgan avatar wmorgan commented on August 25, 2024

This is a regression in the open3 stdlib between Ruby 1.8 and 1.9. I've filed a bug on Redmine. In the meantime, I've backported the 1.8 implementation directly into Heliotrope as a workaround. So this should be fixed now.

from heliotrope.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.