[OT] C programming question: reopen stdin

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Tue Apr 14 19:07:34 UTC 2009


On Tuesday 14 April 2009 20:13:00 Tobias Rehbein wrote:

> I'm having a little trouble solving a specific problem in C. I want to
> write a filter which reads data from stdin. After reading the user should
> be able to interact with the program via stdin.

Just open(2) /dev/tty. If tty is invalid, then you don't have to expect a user 
either.
-- 
Mel


More information about the freebsd-questions mailing list