FIFO
Bernd Petrovitsch
bernd at petrovitsch.priv.at
Wed Nov 28 08:05:30 EST 2012
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
More information about the Kernelnewbies
mailing list