[fpc-pascal] using popen() and assign/reset
M.Santhoff at web.de
Thu Nov 19 11:24:30 CET 2009
I'm trying to get unix.popen() running. The RTL.pdf says the file opened
with popen (stdin for reading here) has to be reset or rewritten. The
example does not do anything like that.
The other part is the question whether the file has to be assign()'ed
befor or not.
s := '';
popen(f, '/usr/bin/w', 'r');
Using it that way does not work, it prints an empty string. Leaving out
reset does the same.
Running the command on the command line does actually print out
something (one line).
What's wrong here?
Marc Santhoff <M.Santhoff at web.de>
More information about the fpc-pascal