[Tutor] Python Daemon(Service)
D-Man
dsh8290@rit.edu
Mon, 12 Mar 2001 14:53:00 -0500
On Sun, Mar 11, 2001 at 04:27:30PM -0800, Sheila King wrote:
| On Sun, 11 Mar 2001 15:19:07 -0900, Tim Johnson <tim@johnsons-web.com> wrote
| about Re: [Tutor] Python Daemon(Service):
|
| :I've been moving away from windows programming, but I think the key word
| :is Service:
| :For this to happen on windows, the application (or python script) would
| :be installed as a Service.
|
| When you say "service", you're talking about WinNT or Win2000. I don't think
| that would apply to Win98 (like I run).
I have heard the term "service" associated only with NT and 2K. I
think that on those systems there is some work that must be done to
tell the OS that your process is a service.
AFAIK there is no such thing in Win9x. After all, daemons and
services really only make sense on a server system. Win9x isn't
intended, not is it suitable IMO, for a server set up. Inetd and
Apache do run on Win9x though, so maybe a peek at it may help. I
think that they are simply processes that don't terminate. I also
think that apache is kind of stuck with a DOS window, unless it is
registered as a service on NT/2000.
Also, as has already been mentioned, a deamon on Unix isn't really
anything special except in what it does for the user. As far as
programming goes it is mostly an event/interrupt based program that
runs infinitely. Certains actions should be taken for security/safety
reasons, but aren't absolutely necessary.
| I am mildly surprised at the very Unix-centric trend that recent responses
| have taken.
The term 'daemon' implies Unix, and the original poster asked about
(RedHat) Linux specifically. Also, some of the suggestions
( chdir to "/", setuid/setgrp to nobody) don't have any windows
equivalents AFAIK. If they do, then it would almost certainly require
different function calls.
| Eventually I think I will get a new computer (within the next year
| or so), and when I do, I think I will put a dual boot option on it,
| and have a Linux drive. But for now, I am without. (I am only mildly
| acquainted with Unix: took one university programming course in C++
| on Unix systems...and host my website off of a Linux server.)
Dual booting isn't actually necessary. On a prebuilt machine it is
actually harder since the disk will only have 1 partition devoted
wholly to Windows (at least my 8GB drive was ~3 years ago). I bought
a second hard drive to try out Linux on. Now I rarely boot the
windows disk. Also, Linux will run perfectly happy on older
486/Pentium machines. Ok, so X won't be so smooth on a 486, but a
Pentium should be ok. Since you are running Win98 now you probably
have a newer machine than that. (My dad is still running Win95 on a
486DX2, 66MHz system; my grandfather has a 386SX with Win95 that I got
for free a couple years ago) When you get the new one simply convert
this one to Linux. You could even use it to firewall for your windows
box.
I strongly prefer Linux and find cygwin invaluable on the Win2k box I
must use at work. I try and make it look as much like a *nix system
as I can. (I primarily use gvim and bash for development, and I found
a nice (free!) virtual desktop utility)
-D