Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Jruby 1.6.7.2 and Cocaine 0.3.2: Errno::ECHILD: No child processes - No child processes #24

Closed
dalizard opened this Issue September 12, 2012 · 5 comments

4 participants

Dimitar Haralanov Jon Yurek Heiko Seebach kperico
Dimitar Haralanov

Hi guys,

I have come to the following problem with jruby 1.6.7.2 and the latest version of the gem:

     Failure/Error: photo.generate_version_for!(style_name)
     Errno::ECHILD:
       No child processes - No child processes
     # org/jruby/RubyProcess.java:512:in `waitpid'
     # org/jruby/RubyProcess.java:497:in `waitpid'
     # org/jruby/RubyArray.java:1615:in `each'
     # org/jruby/RubyEnumerable.java:830:in `inject'
     # org/jruby/RubyHash.java:1186:in `each'
     # org/jruby/RubyBasicObject.java:1698:in `__send__'
     # org/jruby/RubyKernel.java:2097:in `send'
     # org/jruby/RubyBasicObject.java:1704:in `__send__'
     # org/jruby/RubyKernel.java:2101:in `send'
     # org/jruby/RubyBasicObject.java:1698:in `__send__'
     # org/jruby/RubyKernel.java:2097:in `send'
     # org/jruby/RubyBasicObject.java:1704:in `__send__'
     # org/jruby/RubyKernel.java:2101:in `send'

The problem is also discussed here http://stackoverflow.com/questions/12387405/paperclip-with-jruby and a monkey-patch is proposed in the answers section.

Jon Yurek
Collaborator

That's odd. I thought I posted a comment here after I replied to the SO post. Hmm. Anyway, I pushed an accessor to master that will allow you to manually override the Runner.

Cocaine::CommandLine.runner = BackticksRunner.new

I don't know why jruby is reporting that Process.spawn is available when it's not, but at least we have a workaround.

Heiko Seebach

Hi,
JRuby is not waiting until a Process.spawn call returns from the called process, but it returns immediately (similar to IO.popen described here):
http://jira.codehaus.org/browse/JRUBY-6162

Jon Yurek
Collaborator

Thanks for the link there, @helsee. Since you posted that, Charles Nutter has updated JRuby and hopefully fixed that bug. In the meantime, this can be worked around in the manner I mentioned above. I'm going to close this as it looks like a JRuby problem. But if it pops up again, please let me know.

Jon Yurek jyurek closed this September 21, 2012
kperico

happens when running:

Cocaine::CommandLine.new("identify -format %wx%h /home/pablo/1casa_logo.jpg").run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.