[Gambas-user] R: My programm name of process

Ru Vuott vuott at ...325...
Fri Oct 5 12:20:18 CEST 2012


...this is a possible way:

********************
Public Sub Button1_Click()

  Dim s1, s2, pid As String
  
  
  s1 = InputBox("Insert the program name (<B>without</b> its extension .gambas):")
  
  
  For Each pid In Dir("/proc")

    If Exist("/proc/" & pid & "/cmdline") Then
    
      s2 = File.Load("/proc/" & pid & "/cmdline")

      If s2 Like "*" & s1 & ".gambas*" Then
        Shell "kill " & pid
        Exit
      Endif
    
    Endif
    
  Next

End

*******************

bye
vuotttt



--- Ven 5/10/12, abbat <abbat.81 at ...787...> ha scritto:

> Da: abbat <abbat.81 at ...787...>
> Oggetto: [Gambas-user]  My programm name of process
> A: gambas-user at lists.sourceforge.net
> Data: Venerdì 5 ottobre 2012, 08:18
> 
> Hi,
> Current process name of my program is "gbr3".
> So, if I have two and more  running  program of
> gambas I cant kill one
> process.
> "killall gbr3" kills all running gambas programs.
> Is it possible to change a process name of gambas program?
> 
> Thank you.
>  
> -- 
> View this message in context: http://old.nabble.com/My-programm-name-of-process-tp34517217p34517217.html
> Sent from the gambas-user mailing list archive at
> Nabble.com.
> 
> 
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy
> New Relic APM
> Deploy New Relic app performance management and know
> exactly
> what is happening inside your Ruby, Python, PHP, Java, and
> .NET app
> Try New Relic at no cost today and get our sweet Data Nerd
> shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list