Re: renaming core dumps

=?iso-8859-1?Q?Johan Myr=E9en?= (jem@vistacom.fi)
Wed, 21 Feb 1996 12:31:45 +0200 (EET)


On Tue, 20 Feb 1996, Marty Leisner wrote:

> This has always been frustrating...freebsd has core dumps of the
> form core.command which is much preferable over "core".

This has been discussed a number of times on this list. IMHO, if we want
to tack on the command name to the core file, the format should be
command.core, not core.command. That FreeBSD does it the other way is no
reason for us to do so.

By the way, is it safe to assume pid <= 99999?

> This is a fix to generate
>
> core.<name>.<pid>
...
> + char corefile[6+sizeof(current->comm) + 6];
...
> + sprintf(corefile, "core.%s.%d", current->comm, current->pid);

--
Johan Myreen
jem@vistacom.fi