J
Justin C
I've yet to write the file for /etc/init.d to start and stop my
program, but I don't think I should really go that far before I can
make my program detach itself and be able to stop when called with
'/usr/local/bin/progname stop'.
I've been reading the docs of Daemon::Control, Daemon::Generic and
Proc:aemon, but I can't get my program to detach - the problem
appears that it never returns from one of the subs. Here's what
doesn't return:
start_program();
sub start_program {
my $server = RPC::Serialized::Server::NetServer->new({
net_server => {port => $port},
rpc_serialized => {
handlers => {
echo => 'My::Echo',
address_lookup => 'My::AddressLookup',
}
},
});
$server->run;
}
The program works in that there is a server listening, and responding
to requests from other servers on the network.
All suggestions gratefully received.
Justin.
program, but I don't think I should really go that far before I can
make my program detach itself and be able to stop when called with
'/usr/local/bin/progname stop'.
I've been reading the docs of Daemon::Control, Daemon::Generic and
Proc:aemon, but I can't get my program to detach - the problem
appears that it never returns from one of the subs. Here's what
doesn't return:
start_program();
sub start_program {
my $server = RPC::Serialized::Server::NetServer->new({
net_server => {port => $port},
rpc_serialized => {
handlers => {
echo => 'My::Echo',
address_lookup => 'My::AddressLookup',
}
},
});
$server->run;
}
The program works in that there is a server listening, and responding
to requests from other servers on the network.
All suggestions gratefully received.
Justin.