[Gambas-user] Running programs from terminal and by double clicking.

Benoît Minisini gambas at ...1...
Tue Jan 3 23:39:07 CET 2012


Le 03/01/2012 21:32, Jussi Lahtinen a écrit :
> Experimenting more with this... and apparently I have not used "For Input"
> in any other of my projects.
> Since also this fails:
> hProcess = Exec ["echo", "hello?"] For Input As "Process"
>
> So, child program does *not* have to be written with gambas. That was my
> hasty conclusion.
>
> Jussi
>
>

I confirm the problem, but I don't understand why it fails.

"Exec / Shell ... For Input" runs the child program inside a "virtual 
terminal". To do it, you have to follow a precise sequence of system 
calls, and I thought I did it right. But apparently, if the parent 
process does not have a terminal already (for example, when it is run 
from a double-click on an icon), then the creation of the virtual 
terminal for the child fails. And so the child program is not run.

I will investigate. And first I will try to add more informative error 
messages about what happens exactly.

Stay tune...

-- 
Benoît Minisini




More information about the User mailing list