[Gambas-user] Gambas 3.1 and Exec (Bug or NOT?)

Willy Raets willy at ...2734...
Fri Apr 13 19:11:39 CEST 2012


Sebi, I'm afraid I need to go a little further than just testing for
their presence, I want to extract some information out of those commands
that are present.

The added source code (see previous mail) is part of the code of a
bigger library/component I'm building to extract all kind of information
from a system (like window manager, desktop, memory and so on).

Need this for my distributed applications to determine what they are
running on for trouble shooting the applications.

Making it into a library/component so other Gambas developers can
benefit from it as well.

And that all worked fine in both Gambas 2 and Gambas 3.0 (as I am
writing it for both Gambas version). Problems started with Gambas 3.1,
but according to Benoit the 3.0 implementation was the buggy one (so I
guess the Gambas 2 implementation is buggy as well)

So I have recoded it to now work with Gambas 3.1 using TRY and it does.
But now another problem occurs. Seems that some sub process doesn't
kill.

Thanks anyway



On vr, 2012-04-13 at 16:21 +0000, Sebi wrote:
> Hi! If the only thing you want to do is test if a given binary is present on any of the $PATH folders, you can use the CheckProgram function used on the Prooject.module file of the IDE source code. 
> 
> It returns false if present, true if missing. 
> Hope it helps!
> -----Original Message-----
> From: Willy Raets <willy at ...2734...>
> Date: Fri, 13 Apr 2012 18:05:49 
> To: Benoît Minisini<gambas at ...1...>
> Reply-To: willy at ...2734...,
> 	mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Cc: mailing list for gambas users<gambas-user at lists.sourceforge.net>
> Subject: Re: [Gambas-user] Gambas 3.1 and Exec (Bug or NOT?)
> 
> 
> > The bug was in Gambas 3.0. Now, in Gambas 3.1, if you try to run a 
> > program that does not exist, you get an error.
> > 
> > Normally you should get that error message:
> > 
> > "Cannot run child process: cannot exec program: Resource temporarily 
> > unavailable in SysInfo:11"
> > 
> > I don't really understand why you get "Success" instead.
> > 
> > Regards,
> > 
> 
> Hi,
> 
> Okay, so instead of executing command to a string and testing for length
> of returned string, I now use Try Exec[] to string and that seems to the
> job.
> 
> But now on closing the application gbx3 is not closed.
> Some process seems to prevent the application from correctly closing.
> The form closed but that's all.
> 
> Project attached
> 
> [System]
> OperatingSystem=Linux
> Kernel=2.6.35-32-generic
> Architecture=i686
> Memory=2051620 kB
> DistributionVendor=Ubuntu
> DistributionRelease="Ubuntu 10.10"
> Desktop=Gnome
> 
> [Gambas 2]
> Version=2.24.0
> Path=/usr/bin/gbx2
> 
> [Gambas 3]
> Version=3.1.0
> Path=/usr/bin/gbx3
> 
> [Libraries]
> Qt4=libQtCore.so.4.7.0
> GTK+=libgtk-x11-2.0.so.0.2200.0
> 
> 
> 
> 

-- 
Met vriendelijke groeten/ With kind regards,

Willy Raets,
Voorzitter/chairman,
Earthship Belgium vzw.

Nederlandse website: http://www.earthshipbelgium.be/nl.html
English Website: http://www.earthshipbelgium.be/en.html





More information about the User mailing list