AW: [Gambas-user] process.kill

Matthias Laur matthias-laur at ...978...
Tue Jun 7 14:03:11 CEST 2005


Hi Benoit,
Is the development version 1.9.9 stable enough? I'm not sure, because I'm
working on a project for a company near Berlin. They produce hardware. The
application should control home-electronic things like video observation
camera, relais for switching and something mor. It is my bachelor exam for
electrical engineering and I want to use gambas for it ;-)
So it is very important that the application is very stable. It should be
works for weeks without any restart. Otherwise they will send me to the
devil :-(

Regards,
Matthias


-----Ursprüngliche Nachricht-----
Von: gambas-user-admin at lists.sourceforge.net
[mailto:gambas-user-admin at lists.sourceforge.net] Im Auftrag von Benoit
Minisini
Gesendet: Dienstag, 7. Juni 2005 13:40
An: gambas-user at lists.sourceforge.net
Betreff: Re: [Gambas-user] process.kill

On Tuesday 07 June 2005 10:23, Matthias Laur wrote:
> Hi,
>  I"ve still a problem with process.kill. I see live video with the mplayer
>  from /dev/video32. The mplayer has the parameter -wid and belong to a
>  drawing area of a gambas form. So long it works fine. For termination I
> try myprocess.kill. But after then the /dev/video32 is still busy and I
> can"t start the process again. If I use EXEC ["kill", cstr(myprocess.id)]
> it works
>  and /dev/video32 is free after then. It works for many times, but
> sometimes the whole application freeze after then and I must close it. I
> don"t understand why, but I think the linux kill is to heavy und not a
good
> programming.
>
>  1. Can you tell me the difference between Linux command "kill id" and the
>  gambas command process.kill?

The Gambas command Process.Kill is equivalent to "kill -9 pid", but waits
for 
the process ending. I think the problem is in the second point... It seem 
that there is a race condidition in the function that waits for a process 
ending (CPROCESS_wait_for). But it should not! :-(

Can you try the last (1.9.9) development version with this patch ? It should

not fix your problems, but may fix the freeze one. Tell me the result :-)

>
>  2. How can I make sure that the device /dev/video32 is free after the
>  command process.kill?

If /dev/video32 is not freed, then it means that the process was not killed.

Use the 'fuser' command to know the pid of the process that 
uses /dev/video32.

>
>  Many thanks for your help
>
>  I use Gambas 1.0.6
>
>  Regards,
>  Matthias

Regards,

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





More information about the User mailing list