From: bernd@petrovitsch.priv.at (Bernd Petrovitsch)
To: kernelnewbies@lists.kernelnewbies.org
Subject: FIFO
Date: Wed, 28 Nov 2012 14:05:30 +0100 [thread overview]
Message-ID: <1354107933.8224.31.camel@thorin> (raw)
In-Reply-To: <56AB56EAD87AF24C803FB693654D7A89D64184@adbbexch01.adbitaly.com>
Hi!
On Mit, 2012-11-28 at 09:43 +0000, Pietro Paolini wrote:
[....]
> I would like use a FIFO to implement a pipe which use is quite the
> same of the /proc/fs (for example the net statistics then just read).
/proc/fs is a directory hereover.
> I would like use the cat command in order to reach the information, like:
>
> Cat /path/to/pipe
>
> The problem is that cat expect the EOF of file before exit and stay
That "problem" is the defined behaviour and all programs will behave
that way.
> blocked until that, someone know how can I solve the problem ?
Wherever your driver sends out the data (when user-space read(2)s it),
you just return 0 (instead of sleeping/blocking the process) if you are
at the end of the output.
Kind regards,
Bernd
--
Bernd Petrovitsch Email : bernd at petrovitsch.priv.at
LUGA : http://www.luga.at
next prev parent reply other threads:[~2012-11-28 13:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 9:43 FIFO Pietro Paolini
2012-11-28 13:05 ` Bernd Petrovitsch [this message]
2012-11-29 9:07 ` FIFO Pietro Paolini
2012-11-29 9:25 ` FIFO Victor Buciuc
2012-11-29 9:29 ` FIFO Pietro Paolini
2012-11-29 10:44 ` FIFO Bernd Petrovitsch
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=1354107933.8224.31.camel@thorin \
--to=bernd@petrovitsch.priv.at \
--cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).