|
Linux Forum Index » Linux Development - System » device or pipe
Page 1 of 1
|
| Author |
Message |
| Bill Cunningham |
Posted: Wed Apr 30, 2008 1:47 pm |
|
|
|
Guest
|
I would like to experiment with pipes or device modules which ever is
best. I want one pipe (for example) to read a string from another and write
the string. Kinda not good for anything but it's a learning experience. One
pipe would have to write and another read. Or would this be done better with
device modules? I what to use the system calls not the kernel its self.
Bill |
|
|
| Back to top |
|
| Guest |
Posted: Wed Apr 30, 2008 10:57 pm |
|
|
|
|
On Wed, 30 Apr 2008 18:47:17 GMT Bill Cunningham <nospam@nspam.com> wrote:
| I would like to experiment with pipes or device modules which ever is
| best. I want one pipe (for example) to read a string from another and write
| the string. Kinda not good for anything but it's a learning experience. One
| pipe would have to write and another read. Or would this be done better with
| device modules? I what to use the system calls not the kernel its self.
Pipes themselves do not do the reading or writing. A process with an open
file descriptor associated with an end of a pipe can read from or write to
the pipe. The general purpose is for one process to be able to write data
that another process then reads. But a process could have both ends of the
same pipe and write one end and read the other (but be careful as the write
can block when the pipe is full, preventing that process from reading the
other end of the pipe to empty it enough for the write to finish).
--
|WARNING: Due to extreme spam, I no longer see any articles originating from |
| Google Groups. If you want your postings to be seen by more readers |
| you will need to find a different place to post on Usenet. |
| Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) | |
|
|
| Back to top |
|
| Bill Cunningham |
Posted: Thu May 01, 2008 3:17 pm |
|
|
|
Guest
|
<phil-news-nospam@ipal.net> wrote in message
news:fvbf3c31atn@news1.newsguy.com...
Quote: Pipes themselves do not do the reading or writing. A process with an open
file descriptor associated with an end of a pipe can read from or write to
the pipe. The general purpose is for one process to be able to write data
that another process then reads. But a process could have both ends of
the
same pipe and write one end and read the other (but be careful as the
write
can block when the pipe is full, preventing that process from reading the
other end of the pipe to empty it enough for the write to finish).
So the steps I probably need is to fork a process to read from one pipe
then a new process to write to another pipe. Hum. Then would I need a
process to cause the pipe that has been written to to print its data ? Am I
understanding correctly?
Bill |
|
|
| Back to top |
|
| David Schwartz |
Posted: Fri May 02, 2008 2:07 am |
|
|
|
Guest
|
On May 1, 1:17 pm, "Bill Cunningham" <nos...@nspam.com> wrote:
Quote: So the steps I probably need is to fork a process to read from one pipe
then a new process to write to another pipe. Hum. Then would I need a
process to cause the pipe that has been written to to print its data ? Am I
understanding correctly?
I don't think so, since "cause the pipe that has been written to to
print its data" is incoherent. Since a process is reading the data
from the pipe, the data won't be in the pipe except before it gets a
chance to read it.
DS |
|
|
| Back to top |
|
| Marylin... |
Posted: Sun Sep 28, 2008 11:26 pm |
|
|
|
Guest
|
|
| Back to top |
|
| |