From: Rogue Amateur Date: 2006-07-15T04:30:45+09:00 Subject: Re: Nuby Q: Daemonize SOLVED Rogue Amateur wrote: > unknown wrote: >> On Fri, 14 Jul 2006, Rogue Amateur wrote: >> > > [snip] > >> >> can all of your code run as in >> >> ./my_code.rb >> >> ?? >> > > > yes. running ./my_code.rb is how I normally start the software. when > run without daemonizing of any sort, this software runs properly and to > completion. there are 2 modes: interactive and service mode. I'm > trying to make the service mode run as a daemon. > [snip] problem solved, or so it appears. thank you, ALL of you, for your most excellent help. A few of the lines of code referenced a hard-coded path name. This was readily resolved by, prior to daemonizing, trap the correct path, then after the daemonizing, be sure to be in the correct path for proper processing, by deliberately changing to the correct path in the child process. This seems to work properly. FYI, there is another, slightly different and I'm not sure correct Daemon type code at http://www.bigbold.com/snippets/posts/show/2265, for those interested parties. I couldn't get it to work properly, but the site says it does. Again, Thank you All RA -- Posted via http://www.ruby-forum.com/.