Subject: | Net::Server exit 1 on fatal error |
Hi Paul,
When a Net::Server daemon is started and a fatal error is determined
(for example a socket can't be created or the specified user doesn't
exist), it prints out the error but then does exit(0). It would be
useful for init-scripts if fatal() did produce an exit(1) instead.
I did implement a workaround in my application like this:
sub fatal_hook()
{
my ($self, $error, $package, $file, $line) = @_;
die('ERROR: ' . $error);
}
Still, it would be nice if it was fixed in Net::Server. Maybe you can
implement an optional exit-value parameter to server_close() and pass 1
to it in fatal().