[Gambas-user] R: Process in TableVew and to Kill a Process - RECTIUS

tobi tobiasboege01 at ...1601...
Thu Mar 1 14:17:41 CET 2012


hi,

On Thu, 01 Mar 2012, Ru Vuott wrote:

> By trying:
> 
>  Exec ["killall program_name"]
> 
> it gives me an error:
> "Cannot run child process: cannot exec program: resource temporarily unavailable"
> 
> 
> But by using:
> 
>   SHELL "killall program_name"
> 
> it's OK
> .
> 
> 
> --- Gio 1/3/12, Emil Lenngren <emil.lenngren at ...626...> ha scritto:
> 
> > Da: Emil Lenngren <emil.lenngren at ...626...>
> > Oggetto: Re: [Gambas-user] R: Process in TableVew and to Kill a Process - RECTIUS
> > A: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
> > Data: Giovedì 1 marzo 2012, 00:54
> > Try this: Exec("killall
> > program_name")
> > 
> > 2012/3/1 abbat <abbat.81 at ...787...>
> > 
> > >
> > > It works only if I use Button1 (If we execute an app
> > ourselves).
> > > But how to kill process if we know only Name?
> > > Thanks
> > >
> > >
> > > Vuott wrote:
> > > >
> > > > ' Gambas class file
> > > >
> > > > Private hpro As Process
> > > >
> > > >
> > > > Public Sub Button1_Click()
> > > >
> > > >  ' An application start, i.e. “ Gedit “
> > > >    hpro = Exec ["gedit"] As "hpro"
> > > >
> > > > End
> > > >
> > > >
> > > > Public Sub button2_Click()
> > > >
> > > >  ' it closes application process
> > > >    hpro.kill
> > > >
> > > >  End
> > > >
> > > >
> > > > ' this event is raised, when process is closed:
> > > >  Public Sub hpro_Kill()
> > > >
> > > >    Print "Process closed !"
> > > >
> > > >  End
> > > >
> > > >
> > > >
> > >
> > ------------------------------------------------------------------------------
> > > > 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 at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://old.nabble.com/Process-in-TableVew-and-to-Kill-a-Process-tp33417515p33417896.html
> > > Sent from the gambas-user mailing list archive at
> > Nabble.com.
> > >
> > >
> > >
> > >
> > ------------------------------------------------------------------------------
> > > 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 at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> > ------------------------------------------------------------------------------
> > 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 at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > 
> 
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

if i remember correctly EXEC is an interface to the exec family of syscalls. so writing EXEC
["killall prgname"] will result in the program "killall prgname" to be executed. i suggest that none
of your programs is named like that (i can't interpret the error message for it is not in the manual
of the exec family of functions, so i may be wrong with all this). you could try using EXEC
["killall", "prgname"] which will call the program killall with "prgname" as parameter.

regards,
tobi




More information about the User mailing list