Open MattHeffron opened 5 months ago
Here is the BREAK window for the Step 16 case:
Looks to me like this problem happens if you start any sysout with "LDEINIT" set to a filename that doesn't exist (any more). A simple fix is to put the open, getfileinfo etc. under the NLSETQ so that it just returns NIL if there is any failure.
@masinter But the file does exist. It seems that it's just that the path doesn't include any host (e.g. {DSK}
), because that's what the -r
command-line option expects. Including {DSK}
in the -r
option's value doesn't work.
It seems like the device/host is defaulted from the connected directory. (Apparently, this is done "automagically", because it doesn't show in the BT! of the BREAK window.) This works if it is a standard host, but it doesn't handle pseudo hosts.
Also, this error does not happen when starting a .sysout
that was saved with the connected directory being a pseudo host.
After much digging, this is due to EXPAND.PH
defining that a rooted pathname under a pseudo-host isn't really rooted, and that it should be relative to the expansion of the pseudo-host.
With {LU}
defined as {DSK}<home>matt/Interlisp>medley>lispusers>
both: (EXPAND.PH "{LU}<home>matt>GREETWRAP")
and (EXPAND.PH "{LU}home>matt>GREETWRAP")
return
"{DSK}
This leads to the erroneous behavior in the after LOGOUT case; although this appears to be the PSEUDOHOSTS intended behavior.
So, what would be the fix for this? (Having PSEUDOHOSTS add to the BEFORELOGOUTFORMS
and AFTERLOGOUTFORMS
temporary save/restore of \CONNECTED.DIR
wouldn't work because LOGOUT
does the AFTERLOGOUTFORMS
before it tries to re-load the specified greetfile, as defined in the LDEINIT environment variable.)
The only difference in the examples is whether or not there is a < right after the {LU}?
When I try what I think is the equivalent, I get < right after {DSK} in both cases. What do you think should happen?
Another glitch I see is that the result is a mix of <> and /, the names haven't been canonicalized to either Interlisp or Unix standards. OK, but odd.
There are two levels of event processing "restart" events ... the DEVICEEVENTFN for BEFORE, AFTER and AFTER DO càses of SAVEVM, LOGOUT, SYSOUT, and MAKESYS and the user level BEFORE and AFTER eventFORMS, which are easier to explain but don't follow ordering constraints. Pseudo hosts should use device events .
@masinter Yes, but what is essentially re-GREET-ing, i.e. invoking INTERPRET.REM.CM
, is the very last step of LOGOUT
so all effects of either kind of "restart" event have already happened at this point.
If the intent here is to repeat the GREET
effects, then this code probably ought to match what the initial GREET
does when starting a .sysout, as that doesn't have an issue with the path without {DSK}
.
Or, since the medley scripts check for the existence of the specified file, assuming the local file system, they could rewrite the path set into LDEINIT
to prepend a {DSK}
(or {UNIX}
?) and then the OPENFILE
wouldn't consider the \CONNECTED.DIR
at all.
Or, INTERPRET.REM.CM
could always prepend if no {
begins the path.
It seems that INTERPRET.REM.CM
was originally intended to do something else, based on its name. It doesn't look for any file or environment variable named like REM.CM
.
INTERPRET.REM.CM was entirely my invention in the heat of trying to get a process of making a loadup automatically.
In retrospect, using the "GREET" file to wire the steps together was an expedient tactic at the time. And beforewe could do loadups, new sysouts were made by loading in patch files, during (GREET), and LDEINIT was at least an established channel that I built on, just to get it to work once.
Still, we probably want to look at pseudohosts to deal with the situation. | . | before | after restart | after Do |
---|---|---|---|---|
savevm | force open output | restore or warn | assume no special FS changes | |
logout | close all open files | assume FS might have changed | N/A | |
sysout | warn or close all open files, process streams | regreet if user changed? | like SAVEVM? | |
makesys | Open files an error | undo user's GREET (or error) | GREET | N/A |
There are 10 cases (3 x 4 - 2) for pseudohosts. In the afterDO cases you can check if the file system (FS) has changed (but only if,on 'before' event, you remember what the state was.) After SYSOUT and MAKESYS you should assume the file system HAS changed, and reassign pseudohosts based on the current situation.
It's hard to distinguish 10 situations with 4 FORMS variables (NEFORE/AFTER)(LOGOUT/SYSOUT)FORMS. So converting PSEUDOHOSTS touse DEVICE EVENTS should be a first step.
@rmkaplan I think that the mix of <>/ was a typo on my part.
The two examples of {LU}<home>matt>GREETWRAP
with/without the initial < were just my experiment to see how the EXPAND.PH
handled the two cases. The {LU}
was added higher (earlier) in the call stack.
The REM.CM
stuff could probably do with some cleanup again. The old way it worked was that when Lisp (or possibly any program? I don't have the Alto exec manual handy) exited, the contents of a file called REM.CM
(a command file) would be read and executed by the Alto exec. So, if you want to chain portions of the Lisp build that require executing from a different image with some canned input, you write the commands to REM.CM
and exit.
Describe the bug If the connected directory at
(LOGOUT)
was, or included, a pseudohost, then an error occurs when resuming medley with thatlisp.virtualmem
.To Reproduce Steps to reproduce the behavior:
INIT
file..medley_config
contains-r /home/matt/GREETWRAP
(and other args, file is attached)/home/matt
/home/matt/Interlisp/medley/scripts/medley/medley.command --full
(it's a definedalias
)(FILESLOAD (SYSLOAD FROM LISPUSERS) PSEUDOHOSTS)
(PSEUDOHOST 'MEDLEY MEDLEYDIR)
(CNDIR MEDLEYDIR)
(LOGOUT)
/home/matt/Interlisp/medley/scripts/medley/medley.command --k vmem/lisp.virtualmem
(LOGOUT)
returnsNIL
CD {MEDLEY}
(which returns{MEDLEY}
)(LOGOUT)
/home/matt/Interlisp/medley/scripts/medley/medley.command --k vmem/lisp.virtualmem
File not found: /home/matt/GREETWRAP
(LOGOUT)
executes in other contexts, such as from a button in the Lispusers BUTTONS module. (This is my typical case.)Expected behavior Medley resumes without error.
Screenshots
Context (please complete the following information):
Additional context My
.medley_config
and/home/matt/GREETWRAP
files (renamed so github allows attaching): DOT.medley_config.txt GREETWRAP.txt