diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-29 21:16:50 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-29 21:16:50 +0800 |
commit | 8753a65b613be90f1e6c0ce1353a583ccfcbb324 (patch) | |
tree | 9696f26a5dee2dfe9f7e59529f172522b7805af9 | |
parent | f97bbecf0a91aa2524832fc50d122d6ab8f26c39 (diff) | |
download | pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.tar pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.tar.gz pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.tar.bz2 pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.tar.lz pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.tar.xz pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.tar.zst pttbbs-8753a65b613be90f1e6c0ce1353a583ccfcbb324.zip |
setcpulimit for gamble
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@374 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/gamble.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/gamble.c b/pttbbs/mbbsd/gamble.c index 839dbfa5..d7a96a53 100644 --- a/pttbbs/mbbsd/gamble.c +++ b/pttbbs/mbbsd/gamble.c @@ -1,4 +1,4 @@ -/* $Id: gamble.c,v 1.23 2002/06/26 07:48:47 ptt Exp $ */ +/* $Id: gamble.c,v 1.24 2002/06/29 13:16:50 ptt Exp $ */ #include "bbs.h" #ifndef _BBS_UTIL_C_ @@ -265,6 +265,14 @@ int openticket(int bid) { close(0); close(1); setproctitle("open ticket"); +#ifdef CPULIMIT + { + struct rlimit rml; + rml.rlim_cur = RLIM_INFINITY; + rml.rlim_max = RLIM_INFINITY; + setrlimit(RLIMIT_CPU, &rml); + } +#endif bet -= 1; //Âন¯x°}ªºindex |