[ovs-dev] [PATCH 3/4] ovs-tcpdump: Fix error handling when parsing parameter.
Aaron Conole
aconole at redhat.com
Tue Nov 8 17:47:41 UTC 2016
nickcooper-zhangtonghao <nic at opencloud.tech> writes:
> Signed-off-by: nickcooper-zhangtonghao <nic at opencloud.tech>
> ---
> utilities/ovs-tcpdump.in | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
> index c189bc8..d03568d 100755
> --- a/utilities/ovs-tcpdump.in
> +++ b/utilities/ovs-tcpdump.in
> @@ -432,9 +432,12 @@ def main():
> print(data)
> raise KeyboardInterrupt
> except KeyboardInterrupt:
> - pipes.terminate()
> + if pipes.poll() is None:
> + pipes.terminate()
> +
> ovsdb.destroy_mirror('m%s' % interface, ovsdb.port_bridge(interface))
> ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
> + sys.exit(1)
NAK to this - this will make the normal termination path read like an error
on the terminal.
Try it out:
ovs-tcpdump -i port0 -c 1
echo $?
-Aaron
More information about the dev
mailing list