New answers tagged

0

You don't. Pipes are unidirectional: you write at the write end, and read from the read end. If you want bidirectional communication, use a socket, or two pipes. You can use a pipe for bidirectional communication if both processes keep both ends of the pipe open. You need to define a protocol for whose turn it is to talk. This is highly impractical.


1

From IPC mechanisms on Linux - Introduction: The Linux kernel provides the following IPC mechanisms: Signals Anonymous Pipes Named Pipes or FIFOs SysV Message Queues POSIX Message Queues SysV Shared memory POSIX Shared memory SysV semaphores POSIX semaphores FUTEX locks File-backed and anonymous shared memory using mmap UNIX Domain Sockets Netlink ...


1

Do pseudo-ttys count? Those are the magic special files in /dev/pts under Linux. Older Unixes had a fixed number of pseudo-ttys as specially-named device files, I believe. Pseudo-ttys are rather like pipes or socket pairs, but respond to different ioctl() calls. Speaking of socket pairs, do the special file descriptors coming from a socketpair() system ...



Top 50 recent answers are included