fdopen() problem in stdio

Morris Keesan keesan at bbncca.ARPA
Wed Nov 9 00:50:50 AEST 1983


---------------------------------
It seems to me inefficient to keep doing the fdopen() in the called subroutine.
Why not just have the upper level daemon do a fdopen() ONCE, or have it do a
fopen() instead of open(), and then call the subroutine repeatedly with the
stream pointer?  The subroutine would then just have to do fseek(stream,0L,0)
and start using getc(), instead of using lseek() and then mucking around with
fdopen() and dup() and file descriptors.
					    Morris M. Keesan
					    decvax!bbncca!keesan
					    ihnp4!wjh12!bbncca!keesan



More information about the Comp.unix.wizards mailing list