From: hipster Date: 2001-01-03T20:22:26+09:00 Subject: [ruby-talk:8560] Re: Translate daemon code to Windows? On Tue, 02 Jan 2001 13:17:45 +0900, Chris Morris wrote: > 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): [snip rwiki] > 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... First of all, httpd is very Unix. More people mentioned that to me but as I haven't been near a windows box in ages, chances are _I_ won't be able to do much about that. I'd really appreciate it if someone could hack httpd to run on windows, and send me patches. Maybe you could start by just removing the signal trapping code and the fork so it runs in the foreground, and work from there. Since I've been away for a while here's some more loose ends: - the proof-of-principle script for static typing discussed here a while ago is on my website. I'd appreciate comments and improvements. Especially the argument passing problem is tough. - I'm porting Doug Lea's util.concurrent library to Ruby. Are there advances in the synch primitive discussion that is should take into consideration? I'm currently simulating the Java wait/notify semantics. A very ruby newyear to everyone, Michel