Re:Dd is not a disk writing tool (2015)
by sh_tinh_hair on Sunday January 08, 2017 @12:28PM
(#13350804)
Only one ipc primitive (fifo) can be used with man 2 read or write. Sysv ipc cannot, sockets (any domain) cannot (unless there is a kernel interface via /proc or another pseudo fs). What is meant by this saying (and the way it is has been used in my experience) is that everything in unix _looks_ like a file. That is usually meant in reference to the C API which has some r[ec]v|read|write|snd type namespace.
[ Parent
| on HN ]
Re:Dd is not a disk writing tool (2015)
by deathanatos on Sunday January 08, 2017 @03:18PM
(#13351733)
You can read(2) and write(2) to a socket, although it is more normal to recv and send on it. On Linux, you can also (and pretty much MUST) read(2) and write(2) to an eventfd; you can read(2) from a timerfd. That said, the semantics of the latter are considerably different from that of fifos or sockets.
Re:Dd is not a disk writing tool (2015)
by sh_tinh_hair on Sunday January 08, 2017 @04:35PM
(#13352162)
You are right. I've long forgotten about read() and write() compat with sockets for very good reason.
I don't lump an eventfd into the same IPC category as those mentioned in parent for the semantic(s) reason you mention and also for it's intended usage.