Date: Tue, 27 Nov 2018 12:46:49 -0800 From: Conrad Meyer <cem@freebsd.org> To: Willem Jan Withagen <wjw@digiware.nl> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: setting distinct core file names Message-ID: <CAG6CVpVXsbPCTAxu9j7t8_i17uP_55W9a_NuLzyNCGS=qo5C7A@mail.gmail.com> In-Reply-To: <84f498ff-3d65-cd4e-1ff5-74c2e8f41f2e@digiware.nl> References: <84f498ff-3d65-cd4e-1ff5-74c2e8f41f2e@digiware.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
One (ugly) trick is to use multiple filesystem links to the script interpreter, where the link names distinguish the scripts. E.g., $ ln /bin/sh /libexec/my_script_one_sh $ ln /bin/sh /libexec/my_script_two_sh $ cat myscript1.sh #!/libexec/my_script_one_sh ... Cores will be dumped with %N of "my_script_one_sh." Best, Conrad On Tue, Nov 27, 2018 at 9:29 AM Willem Jan Withagen <wjw@digiware.nl> wrote: > > Hi, > > 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?? > --WjW > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVXsbPCTAxu9j7t8_i17uP_55W9a_NuLzyNCGS=qo5C7A>