Version 2 (modified by http://nedko.arnaudov.name/, 3 years ago)

--

When ladish studio is being saved, applications that are run at level 1 receive the SIGUSR1 UNIX signal.

In signal handler function, a global variable can be set to mark that save is needed. On next main loop iteration, the global variable is checked and eventually save is made.

Save of the internal state can be made in a fixed file path, but it is more useful to supply the file path through commandline. When starting, app loads its internal state from the file specified. When saving, app saves its internal state to the file specified.