Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2009 20:13:00 +0200
From:      Tobias Rehbein <tobias.rehbein@web.de>
To:        freebsd-questions@freebsd.org
Subject:   [OT] C programming question: reopen stdin
Message-ID:  <20090414181300.GA3813@sushi.pseudo.local>

next in thread | raw e-mail | index | archive | help
Hi all.

I'm having a little trouble solving a specific problem in C. I want to writ=
e a
filter which reads data from stdin. After reading the user should be able to
interact with the program via stdin. This means I have to reopen stdin but I
don't know how to do this. I tried to solve this using dup() and dup2() but
without success.

You can have a look at my first experiment here:

        http://gist.github.com/95320

I guess the code and the contained comments show what I'm trying to achieve.
Although this is off-topic on this list I hope someone with more knowledge =
in C
may steer me into the right direction.

Sorry for the noise and thanks for reading.

Regards

Tobias

--=20
Tobias Rehbein

PGP key:         4F2AE314
    server:      keys.gnupg.net
    fingerprint: ECDA F300 1B6E 9B87 8524  8663 E8B6 3138 4F2A E314



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