2 ms·
There is no real reason why the read call and write call on a filedescriptor need to go to the same place. To make this work well, I think you would need the c
by gizmo686 8y ago
There is no real reason why the read call and write call on a filedescriptor need to go to the same place.
To make this work well, I think you would need the concept of a pipeline at the file level. Eg, if process A has a pipeline file pipeA, and process B has a pipeline file pipeB, you would need some form of linkPipe(pipeA,pipeB) syscall that causes in in buffer of pipeB to be the same as the outbuffer of pipeA.
Granted, this breaks the general model of a file representing a single block of bytes that both reads and writes operate on, but that model is already gone in UNIX (eg, the in and out buffer for sockets are seperate).
I'm not convinced this is actually a good idea, but seems doable.