Commit 36b18199 authored by Niels Möller's avatar Niels Möller
Browse files

(do_exc_lshd_handler): It seems we need an exception

handler after all, which catches and logs i/o errors.

Rev: src/lshd.c:1.156
parent 28787aaa
......@@ -817,6 +817,22 @@ install_signal_handlers(struct resource *resource)
static void
do_exc_lshd_handler(struct exception_handler *self,
const struct exception *e)
if (e->type & EXC_IO)
CAST_SUBTYPE(io_exception, exc, e);
werror("%z, (errno = %i)\n", e->msg, exc->error);
EXCEPTION_RAISE(self->parent, e);
static struct exception_handler lshd_exception_handler
= STATIC_EXCEPTION_HANDLER(do_exc_lshd_handler, &default_exception_handler);
/* Invoked when starting the ssh-connection service */
/* GABA:
......@@ -975,7 +991,7 @@ make_lshd_listen_callback(struct lshd_options *options,
/* There should be no exceptions raised on the fd:s we listen on */
return make_listen_callback(server_callback, &default_exception_handler);
return make_listen_callback(server_callback, &lshd_exception_handler);
......@@ -1053,7 +1069,7 @@ main(int argc, char **argv)
(options, keys,
if (!fds)
werror("Could not bind any address.\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment