|
|
|
|
|
by amenonsen
2271 days ago
|
|
> So do modern Linux pipes work bi-directionally? No, they do not (nor on the modern BSD kernels, as far as I can tell). The Linux pipe(7) manpage says (under "Portability notes"): «On some systems (but not Linux), pipes are bidirectional:
data can be transmitted in both directions between the
pipe ends. POSIX.1 requires only unidirectional pipes.
Portable applications should avoid reliance on
bidirectional pipe semantics.»
I believe the systems that supported bidirectional pipes were SysV kernels that implemented pipes using STREAMS and 4(?)BSD kernels that implemented it using socketpair. |
|
That said, it is not based on socketpair any more. sys/kern/sys_pipe.c says: