Re: renaming core dumps

Marty Leisner (leisner@sdsp.mc.xerox.com)
Thu, 22 Feb 1996 09:28:33 PST


In message <m0tpGJh-000C9ZC@gratis.xgroup.ernet.in>, you write:
>Doh, it's a bit simpler if you do this:
>
> prog
> brain fried: core dumped
> mv core core.prog
> gdb prog core.prog
>
>-- Raju
>

Life works better if you never make a mistake...

Friendly software takes into account humans err...and make
dumb mistakes...essentially this is "defensive system design".

I "like" an alternate behavior beyond traditional Unix
symmantics (FreeBSD has this).

I also like the propose to have a module to determine how to name
core dumps...would this be implemented through a function pointer??

i.e.

void (*module_make_core_dump)(char *buffer, int size);

static void make_core_dump(char *buffer, int size)
{
if(module_make_core_dump)
(*module_make_core_dump)(buffer, size);

else strncpy(buffer, "core", size);
}

I'll find out how freebsd handles the case of msdos file systems...

How do we get the filesystem type of the current working directory easily?

I also like the BSD 4.4 approach of having sysconfig(8)...It took me a while
before I read the relevant documentation.

marty