From 6adfa1697b24c8ed581d90ef07123d6597aa72e7 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Tue, 19 Apr 2011 01:10:20 -0400 Subject: [PATCH] Make output descriptor nonblocking and shutdown when console mode gets EOF --- src/bsd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bsd.c b/src/bsd.c index 69357b2..a8315ed 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -1625,6 +1625,8 @@ shutdownsock(DESC *d) clearstrings(d); shutdown(d->descriptor, 2); closesocket(d->descriptor); + if (console_mode && d->descriptor == console_input) + shutdown_flag = 1; if (d->prev) d->prev->next = d->next; else /* d was the first one! */ @@ -1667,6 +1669,8 @@ initializesock(int s, int os, char *addr, char *ip, int use_ssl d->connected = 0; d->connected_at = mudtime; make_nonblocking(s); + if (os != s) + make_nonblocking(os); d->output_prefix = 0; d->output_suffix = 0; d->output_size = 0; -- 2.30.2