isamert / scli

a simple terminal user interface for signal messenger (using signal-cli)
GNU General Public License v3.0
432 stars 40 forks source link

Prevent running multiple instances #173

Open exquo opened 2 years ago

exquo commented 2 years ago

Discussed in https://github.com/isamert/scli/discussions/171

Originally posted by **maximbaz** February 6, 2022 Right now running multiple instances of `scli` will not work anyway (one of them will be locked on `signal-cli`), and by accidentally doing this I somehow managed to wipe a few days of history (opened second instance, realized mistake and closed but closed both). We could perhaps just add some code to prevent history overwrite until we get a lock from `signal-cli`, but maybe there is more we could do, have some sort of our own lock, and quicker abort if it's a second instance?