Skip to content

Commit

Permalink
Fix SaveOnExitFile in restored workspaces
Browse files Browse the repository at this point in the history
... and possibly more errors: we accidentally removed all exit handlers
when quitting GAP, just before the workspace was saved, thus when
restoring GAP from this session, those exist handlers were missing,
including the one dealing with `SaveOnExitFile`.

This code looses the ability to install new exit handlers as part of
an exit handler, but that seems like a rather bad (and pointless)
idea to me anyway.
  • Loading branch information
fingolfin committed Sep 9, 2022
1 parent f13d1ed commit c1009a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/session.g
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BIND_GLOBAL("PROGRAM_CLEAN_UP", function()
if IsHPCGAP then
funcs := FromAtomicList(GAPInfo.AtExitFuncs);
else
funcs := GAPInfo.AtExitFuncs;
funcs := ShallowCopy(GAPInfo.AtExitFuncs);
fi;
while not IsEmpty(funcs) do
f := Remove(funcs);
Expand Down

0 comments on commit c1009a2

Please sign in to comment.