Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Dec 1998 01:56:50 +0200
From:      Yani Brankov <ian@bulinfo.net>
To:        hackers@FreeBSD.ORG
Subject:   howto redirect stdin/stdout
Message-ID:  <3686C942.B51A4937@bulinfo.net>

next in thread | raw e-mail | index | archive | help

Hi,

Maybe it's a stupid question, but I don't have much time to search into
the FreeBSD sources for an example.

I need to redirect the stdout from a parent process
to stdin to its child within a C program.

Imagine I would like to start lpr(1) with exec(3) from the C program
and send data to stdin of the lpr(1) from the same C prg.

I don't know what to do with the file descriptors.

If you don't have much time too, just tell me where to find a helpful
example.

Thanks in advance.

--ian

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3686C942.B51A4937>