vpp: fix stdin vs non-interactive command clash 46/40446/2
authorVladislav Grishenko <themiron@yandex-team.ru>
Sun, 14 Mar 2021 21:48:09 +0000 (02:48 +0500)
committerDamjan Marion <dmarion@0xa5.net>
Tue, 5 Mar 2024 18:51:37 +0000 (18:51 +0000)
commit29e916a07c31d63ed6935354b99f16743842fdc6
tree0727b3eb98f753677824b63e05d18063f8323b36
parent09c6cae8c819b71f32fa4d657756c063d4549366
vpp: fix stdin vs non-interactive command clash

In case of both stdin and non-interactive inputs are there
vppctl parses them all, causing mixed corrupted output:
  $ echo foo | vppctl sh bar
  show: unknown input `bar'
  unknown input `foo'

This is not desired, stdin should be ignored if there's a command
but still allow stdin commands - following cases are still equal:
  $ vppctl foo
  $ echo foo | vppctl

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I98667391627150c98a57d49ae544e48ef3351f34
src/vpp/app/vppctl.c