Skip to content

Instantly share code, notes, and snippets.

@edubkendo
Forked from headius/daemonize.rb
Created September 18, 2013 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edubkendo/6603742 to your computer and use it in GitHub Desktop.
Save edubkendo/6603742 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'spoon'
Spoon.spawnp 'jruby', *ARGV
~/projects/jruby ➔ jruby daemonize.rb -e "puts 'starting'; while true; sleep 1; puts 'still going'; end"
~/projects/jruby ➔ starting
still going
still going
still going
still going
~/projects/jruby ➔ still going
still going
still going
ps
PID TTY TIME CMD
342 ttys000 0:00.06 -bash
421 ttys000 0:00.49 /usr/bin/java -d32 -client -Djruby.memory.max=500m -Djruby.stack.max=1024k
363 ttys001 0:00.02 -bash
still going
~/projects/jruby ➔
kistill going
llstill going
still going
421still going
~/projects/jruby ➔
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment