[Gambas-user] Help with SHELL and EXEC

Doriano Blengino doriano.blengino at ...1909...
Sun Oct 12 13:50:29 CEST 2008


Benoit Minisini ha scritto:

May be I am wrong... but it seems to me that you are sometimes critic 
when replying to me. I know, I am more critic than the average users on 
this list, so we are paired...
> On dimanche 12 octobre 2008, Doriano Blengino wrote:
>> Benoit Minisini ha scritto:
>>> On dimanche 12 octobre 2008, Doriano Blengino wrote:
>>>> Kari Laine ha scritto:
>>>>
>>>> If you look carefully at the docs about EXEC:
>>>>
>>>>   [ _Process_ *=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ* |
>>>> *INPUT* } | { *WRITE* | *OUTPUT* } } ] [ *AS* _Name_ ]
>>>>
>>>> you'll notice that you can't specify both READ & WRITE --------^
This syntax says you can not specify a couple of words. May be this 
could be better:

Form1:
[Process=] EXEC Command [ WAIT ] [FOR {READ | WRITE}] [AS Name]
Form2:
[Process=] EXEC Command [ WAIT ] [ FOR {INPUT | OUTPUT | {INPUT 
OUTPUT}}] [AS Name]

This takes in account that specifying READ & WRITE does not work, if 
that will be verified.

>
> Some processes need to be run in a virtual terminal, but most of them don't, 
> and you should not have problems with them.
Don't know anything about that, anyway, I think /usr/bin/tr should be 
one of those which don't need a terminal, being a 'true' filter.
>
> So please be give more details (i.e. some source code!) when you say that 
> they "just don't work".
I sended the project two messages ago, and you replied to it; probably 
you didn't notice the source code attached.
I send it again; run it; click on the togglebutton, look both at the 
textarea and the gambas console.
Then stop it, change "INPUT OUTPUT" to "READ WRITE", and run it again. 
That will tell you who is wrong. I may be wrong, because of my old 2.0.0 
version that, by the way, runs smoothlessly and I am in love with... :-)
> Note that processes that don't need virtual terminals, can be run with them 
> without problems. But you are adding a useless heavy layer then!
I have so many books around I can't find that book I was talking about 
(and it was a *big* one! :->), but I am pretty sure that it was 
describing this argument. I am not sure, and I would like to read again, 
but I can remember that it is not so simple to get both stdin & stdout 
from another process.

Tell me what your tests say to you - this is very interesting because I 
did not try if that book was true or not.

Regards, and happy coding,
Doriano

-------------- next part --------------
A non-text attachment was scrubbed...
Name: doublepipe-0.0.1.tar.gz
Type: application/x-tgz
Size: 7966 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20081012/44de213c/attachment.bin>


More information about the User mailing list