Explain what you mean by "a daemon"?
If you just mean a background task, that's a lot easier than creating a service--which has the daemon-like properties of running detached but is an aweful lot more besides.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
| [reply] |
Yeah, I just meant "a background task"...
I had a look at Proc::Daemon, but it does not seem to run under Windows. However, I would be very grateful if such a module existed for Windows.
Kind regards
| [reply] |
P:\test>start /b perl -le"open LOG, '>', 'my.log';
select LOG;
$|=1;
print ~~localtime while sleep 10" 1>nul 2>&1 <nul
P:\test>u:tail -f my.log
Tue Sep 14 12:11:10 2004
Tue Sep 14 12:11:20 2004
^C
The "one-liner" (here split across multiple lines to avoid wrapping) could be just about any perl script you like. It runs in the background, has it's STDIN, STOUT and STDERR redirected to the nul device and will continue to run until terminated through the task manager or other mechanism.
Proc::Daemon does a couple of other things--changing the umask (whatever that is) etc.-- but nothing that you cannot easily do yourself.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
| [reply] [d/l] |