Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307AbVKSE1y (ORCPT ); Fri, 18 Nov 2005 23:27:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751353AbVKSE1y (ORCPT ); Fri, 18 Nov 2005 23:27:54 -0500 Received: from 22.107.233.220.exetel.com.au ([220.233.107.22]:49668 "EHLO arnor.apana.org.au") by vger.kernel.org with ESMTP id S1751307AbVKSE1x (ORCPT ); Fri, 18 Nov 2005 23:27:53 -0500 From: Herbert Xu To: Arijit.Das@synopsys.com (Arijit Das) Subject: Re: Does Linux has File Stream mapping support...? Cc: linux-kernel@vger.kernel.org Organization: Core In-Reply-To: <7EC22963812B4F40AE780CF2F140AFE920904A@IN01WEMBX1.internal.synopsys.com> X-Newsgroups: apana.lists.os.linux.kernel User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Sat, 19 Nov 2005 15:27:43 +1100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 945 Lines: 26 Arijit Das wrote: > Is it possible to have File Stream Mapping in Linux? What I mean is > this... > > FILE * fp1 = fopen("/foo", "w"); > FILE * fp2 = fopen("/bar", "w"); > FILE * fp_common = (fp1, fp2); > > fprint(fp_common, "This should be written to both files ... /foo and > /bar"); Yes, as long as you're using glibc you can implement this using "Custom Streams". Look for the function fopencookie in your glibc documentation. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/