Re: Why dup()?

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

 



On Fri, Oct 13, 2017 at 3:24 PM, David Newall <openssh@xxxxxxxxxxxxxxx>
wrote:

> On 12/10/17 12:54, Clark Wang wrote:
>
>> How did you hit the problem? "ssh host echo hello | cat" works fine for
>> me.
>>
>
> That's because ssh exited, not because of EOF.
>
> Consider the following:
>
>    ssh localhost 'exec cat > /dev/null' | { read l; echo ${l:-EOF}; }
>
> One should see "EOF" immediately (for values of immediate that include
> startup latency), but that's not what happens.
>

The ssh is still alive since the remote cat is waiting for input so the
read would not see EOF. Did you actually mean 'exec cat < /dev/null'?
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux