From: Chris Morris Date: 2001-01-02T13:17:45+09:00 Subject: [ruby-talk:8490] Translate daemon code to Windows? I'm trying to get httpd and rwiki to work on 95 and both have init code to set itself up as a daemon (following is rwiki): # Run as a daemon... exit! if fork Process.setsid exit! if fork STDIN.close STDOUT.close STDERR.close DRb.thread.join I dinked with this a few days ago and it didn't seem to work, though at the moment I can't recall the problems I ran into. Should this work as is on Windows? If not, what are my options? Ah, wait. I remember the issue I had (questions above still stand) ... I believe this worked fine on Windows, I just had no convenient way of shutting it down. httpd sets up traps: ["SIGTERM", "SIGHUP", "SIGINT"].each{ |sig| trap sig, lambda { shutdown } } ... to call an internal shutdown proc, and I very quickly was lost. The signals were POSIX signals and I have no idea what any of that means and if it even applies to Windows. Help me Obi-wan... Chris