Blame | Last modification | View Log | RSS feed
#! /bin/sh /usr/share/dpatch/dpatch-run
## terminate_on_connection_failure.dpatch by Magnus Holmgren <holmgren@debian.org>
##
## DP: Call exit() in lsh's default exception handler on EXC_IO_CONNECT; otherwise
## DP: lsh won't terminate.
@DPATCH@
diff -urNad trunk~/src/lsh.c trunk/src/lsh.c
--- trunk~/src/lsh.c 2005-03-16 21:06:23.000000000 +0100
+++ trunk/src/lsh.c 2010-01-09 22:32:51.000000000 +0100
@@ -959,6 +959,8 @@
*self->status = EXIT_FAILURE;
werror("%z, (errno = %i)\n", e->msg, exc->error);
+ if (e->type == EXC_IO_CONNECT)
+ exit(*self->status);
}
else
switch(e->type)