chiark / gitweb /
bin/outbound: Change how we wait for SSH tunnels to end. master
authorMark Wooding <mdw@distorted.org.uk>
Wed, 6 May 2015 17:05:14 +0000 (18:05 +0100)
committerMark Wooding <mwooding@good.com>
Wed, 6 May 2015 17:08:12 +0000 (18:08 +0100)
commitf93e3eb38bafd12a4b452bc0e0db2452151d9a8a
tree0e4d63685a7fce6d7dcac23b6f2865fce3358051
parent1dc744ac1faf61a0c8b8f2e427436316f28f660a
bin/outbound: Change how we wait for SSH tunnels to end.

The old method didn't actually work.  Instead, the shell just got
stuck waiting for the pipe to open and never did anything useful.

New approach: make a pipe, and wait for it to close for reading, using
a backgrounded cat(1); have the SSH control-master process write its
(empty) stdout to the pipe; and, finally, wait for the cat(1) to
finish.
bin/outbound