diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-01 21:12:54 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-01 21:12:54 +0800 |
commit | 030c46c0432b7fa6b025b7cefbefe4fbab325092 (patch) | |
tree | 9d039ce4c01762d0bfbbbb040fee7ee967b82962 /mbbsd | |
parent | 566387a0641e4260ec5ed4f6592127d5e373668d (diff) | |
download | pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.tar pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.tar.gz pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.tar.bz2 pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.tar.lz pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.tar.xz pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.tar.zst pttbbs-030c46c0432b7fa6b025b7cefbefe4fbab325092.zip |
NOKILLWATERBALL done.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1442 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/io.c | 12 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 1 | ||||
-rw-r--r-- | mbbsd/talk.c | 2 |
3 files changed, 9 insertions, 6 deletions
@@ -148,10 +148,6 @@ dogetch() { int len; static time_t lastact; -#ifdef NOKILLWATERBALL - if( currutmp && currutmp->msgcount && !reentrant_write_request ) - write_request(1); -#endif if (ibufsize <= icurrchar) { if (flushf) @@ -175,7 +171,8 @@ dogetch() /* jochang: modify first argument of select from FD_SETSIZE */ /* since we are only waiting input from fd 0 and i_newfd(>0) */ - while ((len = select(i_newfd + 1, &readfds, NULL, NULL, i_top ? &timeout : NULL)) < 0) { + while ((len = select(i_newfd + 1, &readfds, NULL, NULL, + i_top ? &timeout : NULL)) < 0) { if (errno != EINTR) abort_bbs(0); /* raise(SIGHUP); */ @@ -187,6 +184,11 @@ dogetch() if (i_newfd && FD_ISSET(i_newfd, &readfds)) return I_OTHERDATA; } +#ifdef NOKILLWATERBALL + if( currutmp && currutmp->msgcount && !reentrant_write_request ) + write_request(1); +#endif + #ifdef SKIP_TELNET_CONTROL_SIGNAL do{ #endif diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index b64cab13..8371d7aa 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -431,6 +431,7 @@ write_request(int sig) } #ifdef NOKILLWATERBALL reentrant_write_request = 0; + currutmp->wbtime = 0; /* race */ #endif } diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 827ef274..7aee54f2 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -669,7 +669,7 @@ my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t * puin) if (uin->msgcount >= 1 && #ifdef NOKILLWATERBALL - 0 + !(uin->wbtime = now) /* race */ #else (uin->pid <= 0 || kill(uin->pid, SIGUSR2) == -1) #endif |