How do I start a shell daemon and then stop it from the same Ruby script?
To be more specific, I would like my Ruby script:
- start the server daemon using the shell command (
rails server | shotgun | etc.). - follow a couple of steps while the server is running.
- make the server exit.
All preferred solutions supported by ruby 1.8 / 1.9 and unix / windows are preferred. (I read fork , for example, does not work on Windows).
ruby
Steph thirion
source share