Hi,

i have a question about pipes in general. I have never used them before
in Linux or Java, so is there any information or tutorials on creating
two-way pipes in Java or C or any program in Linux in general.

thanks,

Justin Lawler

Gregory Steuck wrote:

> >>>>> "David" == David Chen <[EMAIL PROTECTED]> writes:
>
>     David> In the pre-developed project there are a lot of printf
>     David> functions.  Now I have to show the outputs of printf in a
>     David> swing text fileld.  The question is how can I do this without
>     David> touching the pre-written C programs?
>
> I can't think of anything better than creating a named pipe, openning
> it for writing in C code and dup2'ing to descriptor 1 (and 2). Then
> openning this same pipe for reading on Java side. It was so seducing
> to use pipe(2) to create a pair of unnamed pipes, but I couldn't find
> a way of creating a Java stream object given unix side file descriptor.
>
> Bye
> Greg
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to