program duplication

hi,
there is a way to run a program once, and if someone try to lunch another session of the same program, notify it (and stop this second process) ?

You could write a script that could monitor if two or more instances of a program are running and slay them .

oh yes…I already thought this…so there isn’t a function or something…I thinks I can made a lock file created when program starts and deleting when it ends…

Hi,

if you can have gns running I would prefer using name_attach() instead of a file. If you register a name and the program is killed the name is gone too. So you don’t have to think about ‘deliting’ it at the end of your program.
(That’s, in my opinion, the problem with the file because if your program gets killed the file still exists unless you create your own signal handlers to delete the file)