[Gambas-user] Troubles with Exec Shell and Process

Benoit Minisini gambas at ...2...
Tue Jun 3 19:36:02 CEST 2003


Le Dimanche 1 Juin 2003 21:50, Charlie a écrit :
> Salut Benoît,
>
>  it seems that there are a problem with Exec/Shell and Process and Print.
> The attached project is very simple. It sends a wrong string to the
> mysql Database.
> mysql -uroot -p12345678
> You should get an error 1045: Access denied for user: 'root at ...40...'
> (Using password: YES)
> Hope your mysql root password is NOT 12345678 ;-)
>
> If I do that on a prompt i will get back an error (see above), here
> noting, the Process_Error recives nothing.
> ?????
> On the output 'Console' I'v got different outprintings:
> I have only one line  , all output in 1 line, when I use the wait 0.2 ,
> see Schnapschuss2.png
> and the attached Schnapschuss1.png,
> where in line 4  he began to write in 'EXEC star<here>ted'
> and next line 5 'SHELL starte<here>d' also, without the wait 0.2.
>
> I tested it on my well known SuSE 7.2 and a SuSE 8.0.
> Both the same.
>
> amicalement
> Charlie

Process_Error and Process_Write are events, and so are internally managed by 
the global qt event loop.

Whan you use EXEC / SHELL ... with WAIT, the event loop is never called, so 
you never get the result of the command.

Maybe I should call the vent loop when waiting for the end of a process.

The problem is - I'm ashamed :-) - that I didn't write the event loop inside 
the interpreter to manage events when a program do not use the qt component !

Maybe I should do that ?

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




More information about the User mailing list