dbm docs?
BOWMASTER JR
ecs58365 at zach.fit.edu
Mon Jun 3 01:27:23 AEST 1991
I am writing a utility FTPDIR, which will recursively search ftp
directories for a pattern name, since most ftp's don't support an
ls -R or a grep. To do this, I am running an ftp as a child under my main
program, and communicating with the child via pipes. I have redirected
stdin and stdout to my pipe, and set them as unbufferd using the setbuf
command. This works for the child, but as soon as I exec (or system, or
popen) ftp, the stdout gets set back to block buffered. I have tried using
popen on ftp and then using setbuf(stdout,NULL), but it still will not work.
(I know that the pipe is working, and that it's a buffering problem, since
I do get a responsafter I've sent 'verbose' to the child ftp about 2000
times). I also tried to do a setlinebuf(stdout), but my version of C gives
a link error (unix C on a Harris HCX-9). If anyone knows how I can set
the stdout to line buffered or unbuffered and have it stay that way when
I call ftp, I would be much happy if they could please clue me in.
Thanx, James Bowmaster
Florida Institute of Technology
ecs58365 at zach.fit.edu
More information about the Comp.unix.wizards
mailing list