guilherme.e.j has asked for the wisdom of the Perl Monks concerning the following question:
Thanksuse IO::Socket; use Net::hostent; # for OO version of gethostbyaddr use POE; $PORT = 5039; # pick something not in use $sock = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $PORT, Listen => 1, Reuse => 1); die "can't setup server" unless $sock; print "[Server $0 accepting clients]\n"; $command = $sock->accept(); while (1) { while (<$command>) { POE::Session->create( inline_states => { _start => sub { qx(/etc/init.d/asteris +k start); } }, ); $poe_kernel->run(); } sleep(1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl daemon that runs another daemon
by Old_Gray_Bear (Bishop) on Nov 01, 2006 at 20:51 UTC | |
|
Re: Perl daemon that runs another daemon
by Fletch (Bishop) on Nov 01, 2006 at 20:33 UTC | |
by guilherme.e.j (Initiate) on Nov 01, 2006 at 21:13 UTC | |
|
Re: Perl daemon that runs another daemon
by andyford (Curate) on Nov 01, 2006 at 22:35 UTC | |
|
Re: Perl daemon that runs another daemon
by cLive ;-) (Prior) on Nov 01, 2006 at 21:01 UTC | |
|
Re: Perl daemon that runs another daemon
by wjw (Priest) on Nov 01, 2006 at 22:27 UTC | |
|
Re: Perl daemon that runs another daemon
by shmem (Chancellor) on Nov 02, 2006 at 11:49 UTC | |
|
Re: Perl daemon that runs another daemon
by Argel (Prior) on Nov 02, 2006 at 21:40 UTC |