Catching stdin

Started by newdep, July 23, 2004, 05:39:03 AM

Previous topic - Next topic

newdep

Hello Lutz,



I would like to be able to catch the stdin data coming from a (exec) action..



Currently the (exec "programm" "command") works fine but im unable to

get a newlisp to catch the stdin data..



Is it perhpas an enhancement to enhance the "exec" command with stdin.



Because -->



(exec "ls")   ; stores all stdin inside a string list



(exec "programm" "command" ) ; return stdin but newlisp is unable to catch it.





can you enhance "exec" like ??? ->



(exec "programm" stdout stdin )





Regards, Norman..
-- (define? (Cornflakes))

Lutz

#1
That is what I wanted to do originally. It turns out that on most Unix's the popen() call is still only unidirectional: popen(command, "r") or popen(command, "w"). Some OS can do popen(command "r+") for read/write on the same pipe, but most can't. But I will give it another look.



Lutz