For example, one can create a pipe and set up gzip to compress things piped to it:
gzip -9 -c < my_pipe > out.gz
rm my_pipeIn a separate process shell, independently, one could send the data to be compressed:
cat file > my_pipe
The named pipe can be accessed much like a file. Win32 SDK functions such as CreateFile, ReadFile, WriteFile and CloseHandle can be used to open, read from, write to, and close a pipe. C library functions such as fopen, fread, fwrite, and fclose can also be used, unlike Windows Sockets, which does not implement network use of standard file i/o operations. There is no command line interface like Unix.
Named pipes aren't permanent and can't be created as special files on any writable filesystem, unlike in Unix, but are volatile names (freed after the last reference to them is closed) allocated in the root directory of the named pipe filesystem (NPFS), mounted under the special path .pipe (that is, a pipe named "foo" would have a full path name of .pipefoo). Anonymous pipes used in pipelining are actually named pipes with a random name.
They are very rarely seen by users, but there are notable exceptions. The VMware Workstation PC hardware virtualization tool, for instance, can expose emulated serial ports to the host system as named pipes, and the WinDbg kernel mode debugger from Microsoft supports named pipes as a transport for debugging sessions (in fact, VMware and WinDbg can be coupled together - since WinDbg normally requires a serial connection to the target computer - letting driver developers do their development and testing on a single computer). Both programs require the user to enter names in the .pipename form.
Windows NT Named Pipes can inherit a security context.
Summary of named pipes on Microsoft Windows:
Windows NT Named Pipe authentication inheritance is sufficiently opaque and seamless to the user and developer perspective as to be nearly invisible, and consequently it is frequently misunderstood.
N.Y. OFFICE OF CYBER SECURITY AND CRITICAL INFRASTRUCTURE COORDINATION ISSUES ADVISORY REGARDING NEW VULNERABILITY IN MICROSOFT SERVER SERVICE
Sep 13, 2006; The New York State Office of Cyber Security and Critical Infrastructure Coordination issued the following advisory: CSCIC...