I decided to call the IPC stuff tubes, its similar to sockets but much
simpler. A few questions about preferences:
The standard linux pipes always return with the read buffer full except
when the pipe has been closed on the writting end. This works well for
one way pipes but doesn't work for server/client communications where
you have requests and responces going back and forth. Here are a few things
I'm wondering about.
Read has several possibilities:
1) Return only data in the buffer unless there is none then block (unless
O_NONDELAY is on).
2) Try to read as much as one write call produced even if it doesn't fit
in the buffer. This is rather messy since it has to keep track of where
write calls ended.
3)Have it default to #1 and have an IOCTL to switch it back to totally
fullfilling each read request when possible.
I'm leaning toward 3 at this point, since this will work with the line
based I/O that most demons expect. Demons expecting fixed sized data can
switch it to the other mode. Does any one know of programs that would
have problems with this?
Write also has several possibilities:
1) Write all data requested unless the pipe breaks, if O_NONDELAY then
it will just write what will fit in the buffer.
2) Always write only what will fit in the buffer unless it is 0 then block.
I'm leaning toward 1 at this point, can any one see any reason why #2 would be
better?
(am I write in assuming O_NONDELAY is the same as FNDELAY?)
I've got a system call tube(fd[2],type) working which creates a bidirectional
connection and returns the descriptors for each end. type can be the following
TU_STREAM- bidirectional stream
TU_RANDOM- random access requests passed on the server (lseek works)
TU_FS- file system requests passed on to server
TU_FIFO- a plain old fifo (same as pipe(fd[2]))
[possibly another type designed for datagrams]
Currently only TU_STREAM is implemented. The next stage is making this work
when a tube special file is opened. Does any one know where I can get the
source to ls, mknod etc, I didn't see these utilities in the tsx-11 archives
and I will need to patch them.| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Srivatsa Vaddagiri | containers (was Re: -mm merge plans for 2.6.23) |
| Benjamin Herrenschmidt | Re: [linux-pm] [PATCH] Remove process freezer from suspend to RAM pathway |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Patrick McHardy | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 6/7] [CCID-2/3]: Fix sparse warnings |
