[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Volunteers to implement test for stuff called at startup?

From: Richard Stallman
Subject: Re: Volunteers to implement test for stuff called at startup?
Date: Sun, 01 May 2016 19:07:41 -0400

[[[ 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 via email to

[Prev in Thread] Current Thread [Next in Thread]