in reply to Re: Re: How to run POE as a daemon
in thread How to run POE as a daemon
This is not a daemon:yet you would have me believe it is.while (1) { print "Enter a number: "; $Number = <STDIN>; chomp($Number); print "You entered - $Number.\n"; }
No, I don't consider that a daemon because it's actively soliciting information on a handle (or port, or file, etc...) as soon as it starts. I would however consider this to be a very simple daemon...
while (1) { $Number = <STDIN>; chomp($Number); print "You entered - $Number.\n"; }
...because it passively waits for a connection on a handle (or port, etc...) before doing anything. it's not a very useful daemon because it's single threaded ... but lots of daemons can run as single threads.
But none of this is really helping you achieve what you want, so i guess we'll just agree to disagree.
In the mean time, perhaps Proc::Daemon would be of interest to you?
|
|---|