From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 1072155: Avoid duplicate entries in process-environment after re-dumping Date: Tue, 02 Apr 2019 22:24:04 +0300 Message-ID: <834l7gfbxn.fsf@gnu.org> References: <20190321155613.6127.22574@vcs0.savannah.gnu.org> <20190321155614.E6343209B2@vcs0.savannah.gnu.org> <892097f7bc3f5e0ac88d31c60e0bed59.squirrel@dancol.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="166051"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: "Daniel Colascione" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 02 21:24:08 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBP0x-000h5R-BX for ged-emacs-devel@m.gmane.org; Tue, 02 Apr 2019 21:24:07 +0200 Original-Received: from localhost ([127.0.0.1]:45132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBP0w-0002OD-3s for ged-emacs-devel@m.gmane.org; Tue, 02 Apr 2019 15:24:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBP0o-0002No-Cz for emacs-devel@gnu.org; Tue, 02 Apr 2019 15:23:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBP0m-0006iW-FI; Tue, 02 Apr 2019 15:23:57 -0400 Original-Received: from [176.228.60.248] (port=2124 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hBP0j-0001FR-7H; Tue, 02 Apr 2019 15:23:54 -0400 In-reply-to: <892097f7bc3f5e0ac88d31c60e0bed59.squirrel@dancol.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234895 Archived-At: > Date: Tue, 2 Apr 2019 12:02:55 -0700 > From: "Daniel Colascione" > > > + /* Reset process-environment -- this is for when they re-dump a > > + pdump-restored emacs, since set_initial_environment wants always > > + to cons it from scratch. */ > > + Vprocess_environment = Qnil; > > Don't we want to reset process-environment to its old value in > dump_unwind_cleanup? You are thinking about re-dumping from an interactive session? In that case, probably yes. But currently we only support dumping from batch sessions, and in that case I don't see a need to restore process-environment, am I missing something? > > + garbage_collect (); > > + > > CHECK_STRING (filename); > > filename = Fexpand_file_name (filename, Qnil); > > filename = ENCODE_FILE (filename); > > Does it make sense to move this chunk before the > garbage-collect-until-we-run-all-finalizers loop above? That way, we'd run > one fewer GC. Probably. I just wanted to do this as close to the actual dumping as possible, but maybe it's not that important.