[ovs-dev] [PATCH 2/4] ovs-tcpdump: should't halt when dumping traffic.

Aaron Conole aconole at redhat.com
Mon Nov 14 15:22:19 UTC 2016


nickcooper-zhangtonghao <nic at opencloud.tech> writes:

> when sys.stdin is passed to tcpdump via pipe,
> it will cause tcpdump to halt.
>
> Signed-off-by: nickcooper-zhangtonghao <nic at opencloud.tech>
> ---

Strangely, I remember using this and having it work;  it seems that it
requires more effort though (ex: the .read() call needs to change to
readline() as just an example), and I can't seem to restore that behavior.

I think the original intent of this doesn't make sense anymore.  Thanks
for your report, and this patch.

Acked-by: Aaron Conole <aconole at redhat.com>

>  utilities/ovs-tcpdump.in | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
> index 01e1f6d..c189bc8 100755
> --- a/utilities/ovs-tcpdump.in
> +++ b/utilities/ovs-tcpdump.in
> @@ -430,9 +430,6 @@ def main():
>              if len(data) == 0:
>                  raise KeyboardInterrupt
>              print(data)
> -            if select.select([sys.stdin], [], [], 0.0)[0]:
> -                data_in = sys.stdin.read()
> -                pipes.stdin.write(data_in)
>          raise KeyboardInterrupt
>      except KeyboardInterrupt:
>          pipes.terminate()


More information about the dev mailing list