Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!sri-unix!hartwell@shasta From: hartwell%shasta@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: fdopen() problem in stdio Message-ID: <13377@sri-arpa.UUCP> Date: Sun, 6-Nov-83 04:42:00 EST Article-I.D.: sri-arpa.13377 Posted: Sun Nov 6 04:42:00 1983 Date-Received: Tue, 8-Nov-83 21:41:10 EST Lines: 17 From: Steve Hartwell I have a daemon that calls a routine (repeatedly), passing a file descriptor open on a file. The routine does an lseek(fd, 0L, 0) and then calls fdopen() on it, because it would like to use stdio to read the file via getc(). The problem is that after calls to the routine, fdopen() returns NULL because it runs out of FILE pointers (there is a static array of them in stdio). I don't want to use fclose(), that would close the file descriptor. Anyone know a way to release a FILE pointer without closing the file itself? Poking into the structure is not a solution I would like to consider. This is for a 4.1BSD system. Thanks, Steve Hartwell, Stanford