[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how does ssh cause this loop to preterminate?
From: |
Dale R. Worley |
Subject: |
Re: how does ssh cause this loop to preterminate? |
Date: |
Wed, 24 Mar 2021 22:12:18 -0400 |
Eduardo Bustamante <dualbus@gmail.com> writes:
> The summary is that SSH is reading from the same file descriptor as
> "read". Use '-n' (or redirect SSH's stdin from /dev/null) to prevent
> this.
Oh, yeah, I've been bitten by that one many times.
Another solution, though more awkward, is feeding the data for read into
a higher-numbered fd and using "read -u [fd]" to read it.
Dale