Created
October 11, 2011 17:33
-
-
Save nicksieger/1278775 to your computer and use it in GitHub Desktop.
Daemonizing JRuby with Akuma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'java' | |
require 'mvn:org.kohsuke:akuma' | |
d = com.sun.akuma.Daemon.new | |
if d.daemonized? | |
puts "Daemonizing with PID #{$$}" | |
d.init | |
else | |
d.daemonize | |
exit | |
end | |
sleep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gem install mvn:org.kohsuke:akuma | |
Successfully installed mvn:net.java.dev.jna:jna-3.3.0-java | |
Successfully installed mvn:org.kohsuke:akuma-1.6.0-java | |
2 gems installed | |
$ jruby akuma.rb | |
Daemonizing with PID 16811 | |
$ jps -vv | |
16811 Main -Dcom.sun.akuma.Daemon=daemonized -Dfile.encoding=UTF-8 -Djdk.home= -Djruby.home=/Users/nicksieger/Projects/ruby/jruby -Djruby.script=jruby -Djruby.shell=/bin/sh -Djffi.boot.library.path=/Users/nicksieger/Projects/ruby/jruby/lib/native/Darwin -Xmx500m -Xss2048k -Djruby.memory.max=500m -Djruby.stack.max=2048k -Xbootclasspath/a:/Users/nicksieger/Projects/ruby/jruby/lib/jruby.jar | |
16948 Jps -Dapplication.home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home -Xms8m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment