Pipefs

NAME

	pipefs

SYNOPSIS

	pipefs [ -s srvname ] [ -m mntpoint ] [ -p pmod ] command [ arg ... ]

DESCRIPTION

pipefs pipes between two different name spaces.
The srvname default is pipefs.
The most simple usage
	pipefs /bin/foo
will create /srv/foo with permission mode 666.

EXAMPLES

The following shows trivial usage:
term% pipefs tr a-z A-Z
term% mount /srv/pipefs /n/temp
term% echo blah >>/n/temp/data
BLAH
term% echo hellow >>/n/temp/data
HELLOW
term%
This example is worthless because two processes are in the same name space.
The real value of pipefs is to create a pipe between two different name space.

In name space A:

	pipefs /bin/foo
will create /srv/pipefs

In name space B:

	mount /srv/pipefs /n/pipefs
	echo 'Hello world' > /n/pipefs/data
will invoke "/bin/foo" and the data "Hello world" will be read by "/bin/foo" and enables "/bin/foo" to do something in accordance with the input.

CONSIDERATION

Plan 9 pipe is bidirectional. So, we can get output of the command. Especially error information is useful. Why discard the output?

Reading output has some problems:

  1. then we can't use simple tool such as echo.
  2. reading output will waste time and might cause problems.

You should design "/bin/boo" to do only small tasks.

SOURCE

http://plan9.aichi-u.ac.jp/netlib/pipefs