Autore Topic: Impedire l'avvio di un programma.gambas già avviato  (Letto 3428 volte)

Offline Picavbg

  • Senatore Gambero
  • ******
  • Post: 1.620
    • Mostra profilo
Re: Impedire l'avvio di un programma.gambas già avviato
« Risposta #45 il: 19 Marzo 2012, 00:30:20 »
Attenti, ...  che vi viene il mal di testa.  :rotfl:
:ciao:

Offline md9327

  • Moderatore
  • Senatore Gambero
  • *****
  • Post: 2.840
    • Mostra profilo
Re: Impedire l'avvio di un programma.gambas già avviato
« Risposta #46 il: 19 Marzo 2012, 12:14:46 »
Beato te, a me mi viene da vomitare...  ;D

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.269
  • Ne mors quidem nos iunget
    • Mostra profilo
Re: Impedire l'avvio di un programma.gambas già avviato
« Risposta #47 il: 07 Novembre 2012, 15:41:41 »
Nella M.L.I. è stato nuovamente sollevato questo problema, ne riporto una risposta:

" You can use a .Lock file.

if this file exist for example in ~/.cache/myapp dir then say to the user
that the app is already running ... destroy this file when quitting the app

if the app crash before so the file still exist.. just say to the user if
he is sure to not have launched another time...

Fabien Bodard
"
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »