Skip to content

Instantly share code, notes, and snippets.

@Noxn
Created October 24, 2010 14:39
Show Gist options
  • Save Noxn/643569 to your computer and use it in GitHub Desktop.
Save Noxn/643569 to your computer and use it in GitHub Desktop.
Daemon Test
#Just put this at the start:
Process.daemon(nochdir=true) #nochdir=true prevents it from changing the directory to /
#Code used for testing, with running tail every few moments.
3.times do
sleep 3
File.open('test', 'a') {|f| f.write("YAY") }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment