projects
/
cobramush.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4be6518
)
Make output descriptor nonblocking and shutdown when console mode gets EOF
author
Ari Johnson
<ari@theari.com>
Tue, 19 Apr 2011 05:10:20 +0000
(
01:10
-0400)
committer
Ari Johnson
<ari@theari.com>
Tue, 19 Apr 2011 05:10:20 +0000
(
01:10
-0400)
src/bsd.c
patch
|
blob
|
history
diff --git
a/src/bsd.c
b/src/bsd.c
index 69357b2a9d7dc6401d4e7212e99798473fddf78e..a8315ed09f3ba655a8da3eb3f109fb6fc1b8d3cd 100644
(file)
--- 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;