unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Dan Nicolaescu <dann@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: running ./temacs
Date: Thu, 18 Nov 2010 09:26:53 -0500	[thread overview]
Message-ID: <jwv4obebtgf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <yxqsjyzkzpn.fsf@fencepost.gnu.org> (Dan Nicolaescu's message of "Wed, 17 Nov 2010 23:44:36 -0500")

>> [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:

Could you explain your code (i.e. why you need those strcmp hacks, why
you need to set&unset initialized, ...)?

Basically, the control flow around these parts of the code is a bit too
intricate for my poor head right now, and on top of that, I don't know
what it's trying to achieve.

> --- 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.  */


-- Stefan



  reply	other threads:[~2010-11-18 14:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17  6:57 running ./temacs Dan Nicolaescu
2010-11-17  7:43 ` Óscar Fuentes
2010-11-18  4:44 ` Dan Nicolaescu
2010-11-18 14:26   ` Stefan Monnier [this message]
2010-11-18 21:20     ` Dan Nicolaescu
2010-11-18 22:17       ` Stefan Monnier
2010-11-18 22:19         ` Dan Nicolaescu
2010-11-19  7:51           ` Eli Zaretskii
2010-11-20  7:28             ` Dan Nicolaescu
2010-11-21  5:48             ` Stefan Monnier
2011-05-31  5:19               ` Dan Nicolaescu
2011-05-31  6:36                 ` Dan Nicolaescu
2011-05-31  6:47                   ` Eli Zaretskii
2011-05-31  6:55                     ` Dan Nicolaescu
2011-05-31  8:44                       ` Eli Zaretskii
2011-05-31 14:53                         ` Dan Nicolaescu
2011-05-31  6:40                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4obebtgf.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dann@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).