Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site bbncca.ARPA Path: utzoo!linus!decvax!bbncca!keesan From: keesan@bbncca.ARPA (Morris Keesan) Newsgroups: net.unix-wizards Subject: Re: fdopen() problem in stdio Message-ID: <282@bbncca.ARPA> Date: Tue, 8-Nov-83 09:50:50 EST Article-I.D.: bbncca.282 Posted: Tue Nov 8 09:50:50 1983 Date-Received: Wed, 9-Nov-83 07:07:07 EST References: <13377@sri-arpa.UUCP> Organization: Bolt, Beranek and Newman, Cambridge, Ma. Lines: 10 --------------------------------- 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