bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how does ssh cause this loop to preterminate?


From: Eduardo Bustamante
Subject: Re: how does ssh cause this loop to preterminate?
Date: Wed, 24 Mar 2021 14:55:47 -0700

On Wed, Mar 24, 2021 at 2:22 PM gregrwm <rhn-users@greatlakedata.com> wrote:
>
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
> uname output: Linux ginger 4.18.0-240.15.1.el8_3.x86_64 #1 SMP Mon Mar 1
> 17:16:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
>
> Bash Version: 5.1
> Patch Level: 0
> Release Status: release
>
> Description:
>         [Detailed description of the problem, suggestion, or complaint.]
>
> Oddly, somehow, invoking ssh in a loop causes the loop to preterminate.
> Why?

Read https://mywiki.wooledge.org/BashFAQ/089, it should explain what
you're seeing here.

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]