You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been developing a back-end server system in ruby and I was using your awesome Daemonization library seen at http://daemons.rubyforge.org/. One of the issues I am hitting is that when I execute the Daemons.run(script) method the process launches and is daemonized but the rest of the script stops running. For a full example please see: http://pastebin.com/PAwKX6RN
This seems like it might be a limitation of forking in Ruby but if I am utilizing your library incorrectly or you have any insight on how I could get my desired end result I appreciate any input.
Thanks,
Michael Brune
The text was updated successfully, but these errors were encountered:
The Markdown parsing somehow didn't parse the second part of the text correctly. Now fixed. This is what I responded:
Hi Michael,
what you are seeing is the intended behavior of Daemons.run, i.e. it passes all control to the given script.It is — in fact — not a a limitation of the fork comman.
You can achieve your desired behavior by doing another fork on your on within the loop before calling Daemons.run.
Alternatively, you could use Daemons.call to call and daemonize a proc, and then use “load” within the proc to execute the script.
See the examples directory within the gem to get some more guidance.
Hello Thomas,
I've been developing a back-end server system in ruby and I was using your awesome Daemonization library seen at http://daemons.rubyforge.org/. One of the issues I am hitting is that when I execute the Daemons.run(script) method the process launches and is daemonized but the rest of the script stops running. For a full example please see: http://pastebin.com/PAwKX6RN
This seems like it might be a limitation of forking in Ruby but if I am utilizing your library incorrectly or you have any insight on how I could get my desired end result I appreciate any input.
Thanks,
Michael Brune
The text was updated successfully, but these errors were encountered: