bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange stdout stream behaviour after dup() new fd


From: Ondrej Jombik
Subject: Strange stdout stream behaviour after dup() new fd
Date: Tue, 18 Dec 2001 08:22:32 +0100 (CET)

Greets...

        I'm working on simple pipeline connector application. I runs any
amount of subprocesses and close them standart filedescriptors (0, 1, 2)
and dup() them new ones created by pipe(). My application than work as an
data exchanger - it does read()/write() according to the configuration.

        Problem is that stream based applications (such as 'tr') after
dup() and run with execve() seems to think that stdout is file. It is
not line buffered (as I expected), but fully buffered (as file). stderr
works fine.

        Is this desirable behaviour or bug? And how to say stream based
subprocess not to buffer stdout?

        Thank you for your attention and possible help.

        =Nepto=
____________________________________________________________________________
Ondrej 'Nepto' Jombik, Platon SDG                       http://www.platon.sk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]