Am 14.03.2012 10:39, schrieb abbat:
> Dim sOutput As String
>>
>>     Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput
>>
>>     If Split(Trim$(sOutput), gb.NewLine).Count>  1 Then
>>     Quit
>>     Endif

I just tested it and inserted it into some of my projects (Gambas2). It 
runs flawlessly, however when used in a multi-user environment where 
more than one user could use it, you should add -u <username> to the string:


Exec ["pgrep", "-f", "-l", "-u", System.User.Name, 
"NameOfYourProgram.gambas"] Wait To sOutput

This way, it really runs well here!

Rolf


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to