The pipecycle program

pipecycle commandA [commandB ...]

pipecycle runs all the given commands in parallel via “sh -c”. Each command's stdout is connected to a pipe that is read as the next command's stdin. The last command writes to a pipe that is read by the first command.

pipecycle exits 0 when every command exits 0 (and when it encounters no errors of its own). If any command exits nonzero or is killed by a signal, pipecycle exits the same way. If multiple commands exit nonzero or are killed by signals, one of them will be chosen arbitrarily as the exit status to be used.

Exception: if a command is killed by SIGPIPE after the following command has already exited, that error is ignored. If that is the only error, pipecycle will exit 0; if there are other failures in other commands, one of the other failures will be used for pipecycle's exit status.