Scroll to navigation

DPIPE(1) General Commands Manual DPIPE(1)

NAME

dpipe - bi-directional pipe command

SYNOPSIS

dpipe [ OPTIONS ] command [ args ] = command [ args ] [ = [ command [ args ] ] ] ...

DESCRIPTION

dpipe is a general tool to run two commands diverting the standard output of the first command into the standard input of the second and vice-versa. It is the bi-directional extension of the | (pipe) syntax used by all the shells. The = has been chosen as a metaphor of two parallel communication lines between the commands. It is also possible to concatenate several tools. Intermediate programs communicate using standard input and standard output with the preceding tool and alternate standard input and output towards the following tool. The number of the file descriptors is use as alternate standard input and output can be retrieved from the envirnonment variables ALTERNATE_STDIN and ALTERNATE_STDOUT using getenv(3) or getenv(1). If an intermediate tool should process only the data flowing in one direction use { or } as suffix for the preceding = and prefix of the following one.
This tool has been written as a tool for the Virtual Distributed Ethernet.

OPTIONS

dpipe accepts the following options:

create only one process per command, the last one being the parent of all the others (the standard behavior of dpipe is to create a process for dpipe and all the processes running the commands are children of dpipe).
run as a daemon.
write the process id of the dpipe process (or the id of the last command if -r) to the file PIDFILE
write the process group id (negative) including all the processes launched by dpipe to the file PGRPFILE
Like -n but it does not remove PIDFILE or PGRPFILE. (when -n is used together with -p or -P, dpipe creates a cleanup process to wait for the processes to terminate and remove the files. -N avoids the creation of the cleanup process)

EXAMPLES

dpipe a = b
processes a and b are bidirectionally connected: stdin of a is connected to stdout of b and vice-versa
dpipe a = b = c
a and b are connected as above. Alternate stdin of b is connected to stdout of c and alternate stdout of b to stdin of c
dpipe a =} b }= c
This is a cycle of pipes: stdout of a is connected to stdin of b, stdout of b with stdin of c, and stdout of c to stdin of a
dpipe a =} b }={ c {= d = e
all the notations can be mixed together. this is a -> b -> d -> c and back to a; alternate ports of d are connected to e

NOTICE

Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik" i.e. the German "Association for Electrical, Electronic & Information Technologies").

SEE ALSO

vde_switch(1), vde_plug(1), vde_plug2tap(1), vdeq(1). wirefilter(1).

AUTHOR

VDE is a project by Renzo Davoli <renzo@cs.unibo.it>.

August 23, 2016 Virtual Distributed Ethernet