s243a wrote: Sun Dec 20, 2020 4:28 amFrom taersh post above, I think that the unload_sfs command could have an option for interactive mode. In this mode, when the user unloads an sfs it will check if any process are running which depend on the sfs and if there are any such processes then the unload_sfs function will kill them for you (if you choose), prior to unloading the sfs.
That's exactly what I'm doing within my RunScripts. Though, it's not done automatically. If I'd found a .sfs module that won't unload, I'd searched for the programs from that .sfs module via taskmanager. So, I found klogd klauncher kdeinit5 still running after exiting KdenLive. In older versions of KdenLive it was kdeinit4 instead of kdeinit5.
In general I'm loading .sfs modules by a RunScript. All my programs from sfs. modules have a menu entry in my system. When I'm clicking this menu entry, e.g. GIMP, it won't run the GIMP, since GIMP is NOT installed.
Instead the menu entry (the Exec= field inside the .desktop file) is calling the GIMP-RunScript. This RunScript loads the .sfs module of GIMP, after successfully loaded it executes GIMP and a few seconds later it creates an Unload-Script to automatically unload the GIMP .sfs module after exiting GIMP.
Inside of the RunScript there's some fields/parameters to set up. One of these entries is for killing processes which can have multiple entries for programs to be killed before trying to unload the .sfs module.
If a program like e.g. JWildFire needs a dependency to load -in this case: JAVA- there's also a field to have multiple entries for dependent .sfs modules to load before executing the program from the loaded e.g. JWildFire .sfs module. Also I can define .sfs modules to be unloaded first in case they would get in conflict with the .sfs module to be loaded. For some years I used this to unload either Openshot before loading KdenLive and revert. Meanwhile I can load and use both of them without getting in conflict to each other.
Attached is my RunScript for my KdenLive .sfs for examination. It's a fake .gz file.
It's well commented, I think, though one needs to have a little bash experience to make it working for own needs.
It's exactly that stuff one can find and use by the SFS PLUS 2 application.