On Sun, 7 Jun 2020, Allin Cottrell wrote:
On Sun, 7 Jun 2020, Fred Engst wrote:
> Hi Allin,
> Thanks for all the great work that you’ve been doing.
>
> There seems to be a bug when there are multiple instance of gretl working
> at the same time.
>
> Here is a description of the problem that I’m facing:
>
> Whenever I have more than one instance of gretl open, and if I closed one
> of them, then I’m not able to save the .gretl season file that I have
> created before. The pattern of the error message is like:
> “.myfile/session.xml: No such file or directory”.
Ah, I know why that is. On exit, gretl cleans up the contents of the user's
"dot-directory", where session-files in progress are stored.
So when gretl-2 exits it's going to trash gretl-1's session directory.
The workaround is, if you're running more than one gretl instance, don't
close a given instance if you've got an active session in another instance.
We can try revising gretl's clean-up behavior at exit, though that won't be
particularly easy to get right in the multi-instance case.
On second thoughts, maybe there's a relatively simple resolution of
this problem.
At first I was thinking, when a gretl process exits, how is it to
know which are "my" files in the user's "dotdir", which should be
cleaned up, and which actually belong to other gretl processes, and
so shouldn't be touched?
That's not easy, but a better approach might be "Last one out, turn
out the lights". That is, cleanup of dotdir on exit is performed
only if there are no other gretl processes running at the time.
Hopefully that should not be too hard to implement.
Allin