From owner-freebsd-hackers@freebsd.org Tue Nov 27 17:44:09 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 555C411560B3 for ; Tue, 27 Nov 2018 17:44:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87BAC8A72D for ; Tue, 27 Nov 2018 17:44:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wARHhtKY022072 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Nov 2018 19:43:58 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wARHhtKY022072 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wARHhtQO022071; Tue, 27 Nov 2018 19:43:55 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Nov 2018 19:43:55 +0200 From: Konstantin Belousov To: Willem Jan Withagen Cc: FreeBSD Hackers Subject: Re: setting distinct core file names Message-ID: <20181127174355.GC2378@kib.kiev.ua> References: <84f498ff-3d65-cd4e-1ff5-74c2e8f41f2e@digiware.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84f498ff-3d65-cd4e-1ff5-74c2e8f41f2e@digiware.nl> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 87BAC8A72D X-Spamd-Result: default: False [-5.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; IP_SCORE(-2.13)[ip: (-2.60), ipnet: 2001:470::/32(-4.50), asn: 6939(-3.48), country: US(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 17:44:09 -0000 On Tue, Nov 27, 2018 at 06:27:59PM +0100, Willem Jan Withagen 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?? No. Do not expect any proposal that requires kernel to read user mode environment variable to work.