🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.apple2.gno
Article #445

Re: Idea for improved user control of restart flag.

#445
From: David.Empson
Date: Wed, 06 Jan 1993 07:48
40 lines
2524 bytes
In article <1icpfiINNd21@charnel.ecst.csuchico.edu> jamesb@ecst.csuchico.edu (James L. Brookes) writes:
> 
> So, then should all apps be written to use rexit()?  I don't really see
> any reason to -not- make an app restartable, but then I have 4.25 megs
> of memory, and want -everything- restartable :)

If a program relies on its variables being cleared on startup, and
they've been modified by a previous execution, it wouldn't be
restartable.  Making the variable segment 'reload' can get around this
problem (but this isn't easy to do with the standard linker).

> Hm, a couple of questions I just thought of re: restartability:
> 
> I've noticed that, if I have a restartable program running in the
> background, and try to run the same application in the foreground, it will
> not restart.  No surprise, that's to be expected.  But, even after one
> execution, this copy of the app won't restart.  So, is it to be presumed
> that there can only be one copy of a given restartable application in memory
> at a time?

The System Loader keeps track of the application's pathname and user
id.  It is not safe to have the same user ID for two different
pathnames; nor is it safe to have two different user IDs for the same
pathname.

> Is it possible, in a multiuser system, for someone (for example)
> on console to use a restartable program, then exit, and for another person
> not on console to use the copy in memory?

For simultaneous use by two people, the program would require two sets
of variables.  Since the addresses of the variables are patched into
the program at load time, you would need to load a new copy of the
program to refer to a different set of variables.

It can't be done, with the current System Loader architecture.
-- 
David Empson

Internet: David.Empson@bbs.actrix.gen.nz    EMPSON_D@kosmos.wcc.govt.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand
Technical Details
Message-ID: <1993Jan6.074834.14670@actrix.gen.nz>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!actrix!David.Empson
References: <1ians2INNaur@charnel.ecst.csuchico.edu> <bazyar.726209355@teal> <1icpfiINNd21@charnel.ecst.csuchico.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!actrix!David.Empson
Newsgroups: comp.sys.apple2.gno
Subject: Re: Idea for improved user control of restart flag.
Message-ID: <1993Jan6.074834.14670@actrix.gen.nz>
From: David.Empson@bbs.actrix.gen.nz
Date: Wed, 6 Jan 1993 07:48:34 GMT
Sender: David.Empson@actrix.gen.nz (David Empson)
References: <1ians2INNaur@charnel.ecst.csuchico.edu> <bazyar.726209355@teal> <1icpfiINNd21@charnel.ecst.csuchico.edu>
Organization: Actrix Information Exchange
Keywords: restartability
Lines: 40