Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2018 13:31:04 -0500
From:      Lowell Gilbert <freebsd-lists@be-well.ilk.org>
To:        Willem Jan Withagen <wjw@digiware.nl>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: setting distinct core file names
Message-ID:  <44efb6mkyf.fsf@be-well.ilk.org>
In-Reply-To: <84f498ff-3d65-cd4e-1ff5-74c2e8f41f2e@digiware.nl> (Willem Jan Withagen's message of "Tue, 27 Nov 2018 18:27:59 %2B0100")
References:  <84f498ff-3d65-cd4e-1ff5-74c2e8f41f2e@digiware.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Willem Jan Withagen <wjw@digiware.nl> writes:

> Looking at core(5) and sysctl it looks like these are system wide
> settings....
>
> Is there a possibility that a program can set its own corefile name
> (and path?)
>
> During parallel testing I'm running into these scripts that generate
> cores, but they end up all in the same location. But it would be nice
> if I could one way or another determine which file came from what
> script.
>
> But for that I would need to be able to set something like
> 	%N."script".core
> as the core name. I could then put that in then ENV of the script and
> the program would pick it up and set its own corefile name.
>
> Possible??

If you can run the scripts in arbitrary paths, you can encode any extra
information you need in a directory name. [I'd recommend just changing
the process name, but I'm guessing that the cores themselves are being
generated by something running in a subshell.]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44efb6mkyf.fsf>