unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Volunteers to implement test for stuff called at startup?
Date: Sun, 01 May 2016 19:07:41 -0400	[thread overview]
Message-ID: <E1ax0Sj-0007BE-Qf@fencepost.gnu.org> (raw)
In-Reply-To: <83y47tn5tv.fsf@gnu.org> (message from Eli Zaretskii on Sun, 01 May 2016 18:41:48 +0300)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > For example, a recent change caused process-list to be called very
  > early during startup.  The code that was installed was not intended to
  > run during startup, I think, so this was an inadvertent side effect.

A simple way to detect this would be to have a global flag
process_list_ok_to_call, which starts out 0 and gets set to 1
at the stage where calling it becomes ok.  If you call process-list
and process_list_ok_to_call is 0, it would signal an error.

This is more effective as a test mechanism than writing tests, and
simpler than the solution of making a list of all primitives called
and checking that.

Perhaps a few such variables would be enough to identify
the various stages of startup, so that various primitives can
test one of these.


Another approach for this case is to initialize Vprocess_list earlier.
Or make process-list return nil when Vprocess_list is 0.  Then there
would be no problem calling process-list too early.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




  reply	other threads:[~2016-05-01 23:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-01 15:41 Volunteers to implement test for stuff called at startup? Eli Zaretskii
2016-05-01 23:07 ` Richard Stallman [this message]
2016-05-02 15:08   ` Kaushal Modi
2016-05-02 15:15     ` Robert Pluim
2016-05-02 15:23       ` Kaushal Modi
2016-05-02 15:32     ` Eli Zaretskii
2016-05-02 15:44       ` Kaushal Modi
2016-05-02 15:56         ` Eli Zaretskii
2016-05-02 16:23           ` Kaushal Modi
2016-05-11  2:05 ` John Wiegley

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=E1ax0Sj-0007BE-Qf@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=eliz@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).