diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-04-18 22:07:08 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-04-18 22:07:08 +0800 |
commit | d9268ea3021f7112244a894a33882edcc408bf1a (patch) | |
tree | 291838fcf20d715ec99c05716124a071c456108a /mbbsd/io.c | |
parent | fee7749052ac9aab275c17be9e6bf923394b63f0 (diff) | |
download | pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.tar pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.tar.gz pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.tar.bz2 pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.tar.lz pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.tar.xz pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.tar.zst pttbbs-d9268ea3021f7112244a894a33882edcc408bf1a.zip |
1. make tty_read more clear and reable
2. hack to prevent ^W SIGSEGV when parent is incorrect.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2697 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r-- | mbbsd/io.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -189,17 +189,13 @@ dogetch(void) do { len = tty_read(inbuf, IBUFSIZE); - /* len = 0: abort, < 1: read more */ + /* tty_read will handle abort_bbs. + * len <= 0: read more */ #ifdef CONVERT - if(len > 0) { + if(len > 0) len = input_wrapper(inbuf, len); - if(len == 0) len = -1; - } #endif - } while (len < 0); - - if (len == 0) - abort_bbs(0); + } while (len <= 0); ibufsize = len; icurrchar = 0; |