mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bas Westerbaan <bas.westerbaan@gmail.com>
To: Arijit Das <Arijit.Das@synopsys.com>
Cc: 7eggert@gmx.de, linux-kernel@vger.kernel.org
Subject: Re: Does Linux has File Stream mapping support...?
Date: Fri, 18 Nov 2005 13:59:27 +0100	[thread overview]
Message-ID: <6880bed30511180459s66efa480y9a8c5f90b1bc73ac@mail.gmail.com> (raw)
In-Reply-To: <7EC22963812B4F40AE780CF2F140AFE920906A@IN01WEMBX1.internal.synopsys.com>

Maybe an (ugly) way around it would be to simply use a parent process
which captures the stdout of your compiler and writes it to the log
file and prints it to its own stdout.


On 11/18/05, Arijit Das <Arijit.Das@synopsys.com> wrote:
> Ye...I know of tee.
>
> But the issue here is I have a HUGE Compiler (an Simulation tool) in which thousands of places there are "printf" statements to print messages to STDOUT stream. Now, a requirement came up which needs all those messages thrown to STDOUT also to be logged in a LOGFILE (in addition to STDOUT). Yes, this can be done through tee...but the usage model of the compiler doesn't leave that possibility open for me.
>
> So, am looking for a solution inside the Compiler code.
>
> Thanks,
> Arijit
>
> -----Original Message-----
> From: Bodo Eggert [mailto:harvested.in.lkml@7eggert.dyndns.org]
> Sent: Friday, November 18, 2005 6:00 PM
> To: Arijit Das; linux-kernel@vger.kernel.org
> Subject: Re: Does Linux has File Stream mapping support...?
>
> Arijit Das <Arijit.Das@synopsys.com> 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 = <Stream_Mapping_Func>(fp1, fp2);
> >
> > fprint(fp_common, "This should be written to both files ... /foo and
> > /bar");
>
> It's a userspace problem. man "tee".
>
> Doing this in the kernel would be horrible.
>
> --
> Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
> verbreiteten Lügen zu sabotieren.
> -
> 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/
>



--
Bas Westerbaan
http://blog.w-nz.com/
GPG Public Keys: http://w-nz.com/keys/bas.westerbaan.asc

  reply	other threads:[~2005-11-18 12:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18 12:51 Arijit Das
2005-11-18 12:59 ` Bas Westerbaan [this message]
2005-11-18 13:01   ` Bas Westerbaan
2005-11-18 14:28     ` Dick Streefland
2005-11-18 19:06 ` Bill Davidsen
2005-11-18 19:39 ` Lennart Sorensen
2005-11-21  9:18 ` Jim Nance
     [not found] <5abPs-7Da-41@gated-at.bofh.it>
2005-11-18 12:30 ` Bodo Eggert
  -- strict thread matches above, loose matches on Subject: below --
2005-11-18 10:38 Arijit Das
2005-11-18 20:14 ` James Courtier-Dutton
2005-11-18 20:41   ` linux-os (Dick Johnson)
2005-11-19  4:27 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6880bed30511180459s66efa480y9a8c5f90b1bc73ac@mail.gmail.com \
    --to=bas.westerbaan@gmail.com \
    --cc=7eggert@gmx.de \
    --cc=Arijit.Das@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®