From: Hossein Mobahi <hmobahi@yahoo.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: Problem with read() and named pipe (FIFO) (pipe not disk)
Date: Tue, 17 Aug 2004 12:25:47 -0700 (PDT) [thread overview]
Message-ID: <20040817192547.72085.qmail@web12708.mail.yahoo.com> (raw)
Sure, the stdio's buffer is limited. However, as you
said, the real-time constraint doesn't let me wait for
the buffer to become full. I need to read it as soon
as the data is written to the buffer. So I really need
to flush stdio's buffer out of that process.
--Hossein
--- joy <gracecott@sancharnet.in> wrote:
> The program cannot buffer data for all eternity and
> must eventually
> write it to the
> pipe. So, even if read() blocks because there is no
> data available, it
> must return as soon as data
> is written. The real-time element will be lost
> though I doubt it will
> buffer for a long time.
> Is this the behavior you are experiencing and is
> there a problem with this ?
>
> Hossein Mobahi wrote:
> >The solution that I know is using
> >write(STDOUT_FILENO,....) instead of printf because
> it
> >does not buffer. However, I do not have access to
> the
> >source code of prg1, and I must somehow make prg1
> >flush its standard I/O buffer from outside.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
next reply other threads:[~2004-08-17 19:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-17 19:25 Hossein Mobahi [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-17 3:21 Problem with read() and named pipe (FIFO) joy
2004-08-17 10:55 ` Problem with read() and named pipe (FIFO) (pipe not disk) Hossein Mobahi
2004-08-17 17:58 ` joy
2004-08-17 19:24 ` Hossein Mobahi
2004-08-17 19:25 ` Hossein Mobahi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040817192547.72085.qmail@web12708.mail.yahoo.com \
--to=hmobahi@yahoo.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.