Kyle Schmitt wrote: > I needed a little daemon thisafternoon, so I wrote one in ruby using > fork and Process.detach. It's working ok I suppose, except that when > I logout, it hangs, and I have to kill my session. It's a little > annoying, to say the least. Anyone know a better way of doing this? IIUC, Process.detach is not what you need to start a daemon. All it does is start a ruby thread to reap the pid when the child exits, so you don't end up with zombies. If the parent process exits first, this thread is gone anyway. Search the list for daemonize... for a classic daemon, you need to double fork, Process.setsid, chdir, disconnect from stdin/out, and probably something else I'm forgetting. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407