Re: Was: Rare Bug Now: Dumping Cores

From: Mike Stilson (mike@c746148-a.ehlls1.pa.home.com)
Date: 10/08/01


On Tue, Oct 09, 2001 at 09:40:29AM +1000, Caniffe wrote:
>> I know that the MUD can dump core files, but mine does not, perhaps I could
>
>Anyhow, if you type "ulimit -a" you'll get maybe something like:
>core file size (blocks)     0
>"ulimit -c unlimited", which'll result in:
>core file size (blocks)     unlimited

Or set it w/in the program itself.

(-- mailer code --)
somewhere early in the initialization of everything:

struct rlimit rlim;
rlim.rlim_max = RLIM_INFINITY;
if(setrlimit(RLIMIT_CORE, &rlim)) {
        sprintf(errbuf, "SYSERR: Error setting core limit '%m');
        basic_mud_log(errbuf);
} else
        basic_mud_log("Core size set.");



I have a little function called void limits(void) called which does
that, makes sure the mud is running setgid as group mud, makes sure it's
chdir'ed to the right place, and a couple other little things like that.

-me

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST