From 6a118d17eed23598f46a293e96831f94a768811e Mon Sep 17 00:00:00 2001 From: ptt Date: Sat, 29 Jun 2002 13:16:50 +0000 Subject: setcpulimit for gamble git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@374 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/gamble.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3