Created
December 6, 2011 22:20
-
-
Save takai/1440300 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
$0 = 'daemon-env' | |
loop {} |
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
#!/usr/local/ruby/bin/ruby | |
$0 = 'daemon-ruby' | |
loop {} |
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
% ./daemon-env.rb & | |
[1] 10875 | |
% ./daemon-ruby.rb & | |
[2] 10877 | |
% pgrep daemon-env | |
% pgrep daemon-ruby | |
10877 | |
% ps -o 'pid,ucomm,command' | |
PID COMMAND COMMAND | |
10784 zsh -zsh | |
10875 ruby daemon-env | |
10877 daemon-ruby.rb daemon-ruby | |
10881 ps ps -o pid,ucomm,command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment