Created
March 3, 2010 21:48
-
-
Save headius/321084 to your computer and use it in GitHub Desktop.
This file contains 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 'spoon' | |
Spoon.spawnp 'jruby', *ARGV |
This file contains 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
~/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 ➔ |
From http://www.qnx.com/developers/docs/660/index.jsp?topic=%2Fcom.qnx.doc.neutrino.lib_ref%2Ftopic%2Fp%2Fposix_spawn.html
Description:
The posix_spawn() and posix_spawnp() functions create a new process (child process) from the specified process image. The new process image is constructed from a regular executable file called the new process image file. The difference between these two functions is only in the means by which they specify the new process image file:
posix_spawn() takes an absolute path to the executable
posix_spawnp() performs a path search for the file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the difference between between
vs