Read/Write to Process
Dar Scott
dsc at swcp.com
Mon Dec 29 16:26:29 EST 2003
On Monday, December 29, 2003, at 02:01 PM, Roy Mendelssohn wrote:
> Can someone give me an example using read to process / write to
> process commands to communicate with an external program? I'm using
> Revolution as an interface to feed input to a command-line executable
> program (generated from Fortran). I have successfully used the
> "shell()" command to run the program, but I want to write to and get
> feedback from the program as it runs. I'm running Revolution 2.1.2 on
> OSX. Any advice would be much appreciated.
This does not work on OS X. It is so bug ridden to be hardly useful on
Windows. The design seems to use a single pipe instead of a double
pipe so if you need output after closing input, this won't work even
when bugs are fixed. Workaround attempts such as using pipe files and
other things on OS X have not worked for me, but others might have had
some success.
If you have control of the Fortran program, I'd look for another way to
communicate. If not, I'd look at stdin and stdout redirection to files
in shell.
Dar Scott
More information about the use-livecode
mailing list