Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!sri-unix!greep@su-dsn From: greep%su-dsn@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: fdopen() problem in stdio Message-ID: <13386@sri-arpa.UUCP> Date: Sun, 6-Nov-83 14:40:00 EST Article-I.D.: sri-arpa.13386 Posted: Sun Nov 6 14:40:00 1983 Date-Received: Tue, 8-Nov-83 21:03:52 EST Lines: 8 You can do a dup() on the file descriptor first, then the close() done by fclose() won't really caused the file to be closed. Of course you'll have to keep track of the new file descriptor returned by dup(). However, (at least in 4.1bsd) _NFILE in stdio.h is set to 20, the same value is the number of open files per process the kernel lets you have (defined in NOFILE in /usr/sys/h/param.h), so if you're running out of stdio buffers, you'll probably run out of file descriptors pretty soon.