From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: running ./temacs Date: Wed, 17 Nov 2010 23:44:36 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1290055496 22877 80.91.229.12 (18 Nov 2010 04:44:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 18 Nov 2010 04:44:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 18 05:44:48 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PIwMW-0003GI-Ic for ged-emacs-devel@m.gmane.org; Thu, 18 Nov 2010 05:44:44 +0100 Original-Received: from localhost ([127.0.0.1]:48352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIwMW-0007kL-1O for ged-emacs-devel@m.gmane.org; Wed, 17 Nov 2010 23:44:44 -0500 Original-Received: from [140.186.70.92] (port=54595 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIwMR-0007kG-6j for emacs-devel@gnu.org; Wed, 17 Nov 2010 23:44:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIwMQ-0000ck-7w for emacs-devel@gnu.org; Wed, 17 Nov 2010 23:44:39 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:33232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIwMQ-0000cf-3n for emacs-devel@gnu.org; Wed, 17 Nov 2010 23:44:38 -0500 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PIwMO-0006JJ-BJ for emacs-devel@gnu.org; Wed, 17 Nov 2010 23:44:36 -0500 In-Reply-To: (Dan Nicolaescu's message of "Wed\, 17 Nov 2010 01\:57\:10 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132812 Archived-At: Dan Nicolaescu writes: > [Hacking around this so that Vprocess_environment is initialized when > not dumping makes ./temacs work correctly] In case anyone wants to see the difference in behavior, here's the ugly hack: --- src/emacs.c 2010-11-15 06:10:35 +0000 +++ src/emacs.c 2010-11-17 07:40:04 +0000 @@ -1455,7 +1455,15 @@ main (int argc, char **argv) /* egetenv is a pretty low-level facility, which may get called in many circumstances; it seems flimsy to put off initializing it until calling init_callproc. */ - set_initial_environment (); + + if (!initialized && !((strcmp (argv[argc-1], "dump") == 0 + || strcmp (argv[argc-1], "bootstrap") == 0))){ + initialized = 1; + set_initial_environment (); + initialized = 0; + } + else + set_initial_environment (); /* AIX crashes are reported in system versions 3.2.3 and 3.2.4 if this is not done. Do it after set_global_environment so that we don't pollute Vglobal_environment. */