-
Notifications
You must be signed in to change notification settings - Fork 170
Description
I am currently using lg2 to sync a git repository using a custom shell script, that I run using an iOS shortcut.
Here's the shortcut for a general idea.

The issue with this shortcut though, lg2 status often errors out with segmentation faults. I observed that if I manually open and exit a-Shell from the iOS app switcher, these segfaults go away -- actually, the exit bookend commands that you see in the above shortcut screenshot were added later, to simulate this behaviour.
However, I have noticed that exits don't destroy the instance. When I open the app after running an exit, I am often times presented with an old instance. Added a short recording below that demonstrates this issue.
a-Shell.exit.issue.mp4
I am positive that if I can somehow program the proper "close everything" behaviour into the shortcut, I don't have to keep wrangling with the whole "open and close a-Shell before running the shortcut" act. I am presuming the segmentation faults have something to do with the shortcut creating a new session and not properly GC-ing the whole thing.
Any pointers on how to manage this better, if it can be managed in the first place, or a workaround if I am plainly missing something... are welcome and appreciated.