summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-08-04 14:58:02 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-08-04 14:58:02 +0800
commit2958f2d55afa6a7128a9515e0a91083bca7d6975 (patch)
tree95ad3a144916924d0a2ce6e361f7ab3c7b718df7 /mbbsd
parent5385d76f7f5f8ab7af9264096a4ec2525fd0c8f8 (diff)
downloadpttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.tar
pttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.tar.gz
pttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.tar.bz2
pttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.tar.lz
pttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.tar.xz
pttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.tar.zst
pttbbs-2958f2d55afa6a7128a9515e0a91083bca7d6975.zip
add SKIP_TELNET_CONTROL_SIGNAL
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1082 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/io.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 3b15bbe7..0a48893d 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.29 2003/05/07 03:35:07 bbs Exp $ */
+/* $Id$ */
#include "bbs.h"
#if defined(linux)
@@ -130,11 +130,17 @@ dogetch()
if (i_newfd && FD_ISSET(i_newfd, &readfds))
return I_OTHERDATA;
}
- while ((len = read(0, inbuf, IBUFSIZE)) <= 0) {
- if (len == 0 || errno != EINTR)
- abort_bbs(0);
- /* raise(SIGHUP); */
- }
+#ifdef SKIP_TELNET_CONTROL_SIGNAL
+ do{
+#endif
+ while ((len = read(0, inbuf, IBUFSIZE)) <= 0) {
+ if (len == 0 || errno != EINTR)
+ abort_bbs(0);
+ /* raise(SIGHUP); */
+ }
+#ifdef SKIP_TELNET_CONTROL_SIGNAL
+ } while( inbuf[0] == -1 );
+#endif
ibufsize = len;
icurrchar = 0;
}