[Gambas-user] Dynamic processes and killing them

Benoit Minisini gambas at ...2...
Sat Jul 19 09:48:50 CEST 2003


Le Samedi 19 Juillet 2003 05:43, Rob a écrit :
> On Friday 18 July 2003 23:08, Brian Snipes wrote:
> > clicked on.  There is also a delete button that I want to remove the
> > list item and kill the process that goes along with that item.  I can't
> > seem to figure out how to determine how to remove this process.  Here is
>
> ...
>
> >         EXEC ["ping", txtInsert.text] FOR READ AS myProcess
>
> ...
>
> >       TRY Process.kill(myPid)
>
> Process.Kill isn't static, so you would need to be using myProcess.kill
> (with no argument.)
>
> Also, every time you insert a new process you're overwriting your public
> myProcess variable and thus losing the reference to the previous ping, so
> maybe you want to be doing an array or collection of process objects rather
> than just the one.
>
> Rob
>

Moreover, when you close your window, your spawn processes are not 
automatically killed, so you must kill them in the Form_Close event handler.

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list