From owner-freebsd-current Fri Aug 30 03:56:59 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA06065 for current-outgoing; Fri, 30 Aug 1996 03:56:59 -0700 (PDT) Received: from fgate.flevel.co.uk (root@fgate.flevel.co.uk [194.6.101.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id DAA06057 for ; Fri, 30 Aug 1996 03:56:56 -0700 (PDT) Received: from localhost (dev@localhost) by fgate.flevel.co.uk (8.7.5/8.6.9) with SMTP id MAA06427 for ; Fri, 30 Aug 1996 12:01:19 +0100 (BST) Date: Fri, 30 Aug 1996 12:01:19 +0100 (BST) From: Developer To: freebsd-current@freebsd.org Subject: File handle -> char* ? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Is there any way in which I can pass a routine a file handle and make the data just go into a buffer which I can then use as a char* later? The only way Ive thought of doing it at the moment is saving it to a temp file and then reading it back, but that is very inefficent.. I can`t really do it with a pipe because the function I am calling has side effects and I`d need to fork.. thus losing them.. Any ideas? Regards, Trefor S.