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 | 6a118d17eed23598f46a293e96831f94a768811e (patch) | |
tree | a1841da64a1fa479c3b485d200207ef0716ce801 /mbbsd/gamble.c | |
parent | ba5d17c8b5bd2d867ceb1e1729f60003101218d8 (diff) | |
download | pttbbs-6a118d17eed23598f46a293e96831f94a768811e.tar pttbbs-6a118d17eed23598f46a293e96831f94a768811e.tar.gz pttbbs-6a118d17eed23598f46a293e96831f94a768811e.tar.bz2 pttbbs-6a118d17eed23598f46a293e96831f94a768811e.tar.lz pttbbs-6a118d17eed23598f46a293e96831f94a768811e.tar.xz pttbbs-6a118d17eed23598f46a293e96831f94a768811e.tar.zst pttbbs-6a118d17eed23598f46a293e96831f94a768811e.zip |
setcpulimit for gamble
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@374 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/gamble.c')
-rw-r--r-- | mbbsd/gamble.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index 839dbfa5..d7a96a53 100644 --- a/mbbsd/gamble.c +++ b/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 |