[fpc-pascal] fpExecv

Alain Michaud Alain.Michaud at nrc-cnrc.gc.ca
Wed Sep 7 05:20:20 CEST 2005


Hi,

  Someone could please help me with this:


the simple console program (linux):

>prog1 --arg1 123

prints the result 123:

>prog1 --arg 123
123

now I write another program 'prog2' that has the line:

fpExecv('prog1',pp);

where 

pp[0] <-- 'prog1'
pp[1] <-- '--arg'
pp[2] <-- '123'

If I run this second program, it will print the standard otput to the
console:

>prog2
123

Question: what should I do to redirect ("pipe") the output "123" into
the program "prog2" and not print it? Is it possible?

Thank you

Alain Michaud





More information about the fpc-pascal mailing list