Make special files. Obviously this (the underlying system call, actually) gets used a lot in /dev, but there are other uses. I often use this to make a device file for printing to (see How can I make a device that will print to a network printer?), and the same general idea is useful for other schemes. I've used it to let a non-privileged user send commands to a root process - the user writes to the named pipe, and a root process reads it and acts appropriately (you wouldn't want to literally execute whatever the user writes - you would do this for a specific purpose, such as copying data written to a file in a protected directory, etc.).
On some systems there is a specific "mkfifo" command; mknod is more general purpose.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-04-28 Tony Lawrence
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." (Douglas Adams)